Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do validations only allow true or false
#18
OK. So how about the XML:

Code:
<validations>
   <validation>
       <rule></rule>
       <restrictions>
           <restriction></restriction>
       </restrictions>
       <message>%%%FUNCTION%%%checkAccountAddress%%%PARAMS%%%{field},lbl</message>
   </validation>
</validations>
The above won't work since there's nothing in the <rule> or <restriction>. What needs to be in there? Just anything or specific stuff like 'contains' or 'mex'?

Sorry, but both versions aren't working for me. First of all: what I did in a recent installation:
Validation map on SalesOrders
   
Then the business action
   
Which points to JS code
PHP Code:
function checkAccountAddress(edit_typeformNameactioncallbackparams) {
    
console.log(edit_typeformNameactioncallbackparams);
    
alert('test');

Resulting in
   
No logging to the console and an empty alert. I checked the buffer through the network tab, it loads the JS properly.

The second method, using a PRESAVE business action, I still don't understand. Take these steps:
  • I go to business actions
  • I create a new one
  • I select type PRESAVE
  • I set some 'block://className:filePath' as the URL
  • I save the business action
Then what happens? Does something happen on both inline edit as full save? Is there any way the 'process' method can allow the save to continue? In the blogpost it returns a function name but can it also say 'Ah OK I'm not complaining, proceed saving'?
Reply


Messages In This Thread
RE: Do validations only allow true or false - Guido1982 - 08-11-2020, 07:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)