Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I was asked to do a validation where the salesorder shipping address needs to match the account shipping address. Now that's easy enough, but I was also asked to provide the option to overwrite the currect salesorder address with the address from the account when there is no match. Do we have some option to fire a custom function when a validation fails or is it just true of false? And if it is, would it be a good idea to allow custom 'ontrue' and 'onfalse' handlers? I could work on that.
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
Very nice, let me try and figure this out.
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
I think that is intentional to show readers that they have access to that object without creating it again (less memory and setup overhead)
Joe
TSolucio
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
I tried it. can you share some maps to see what you have done?
Joe
TSolucio
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
you just need to create a JS function and return the message in the indicated format
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I'm not sure I understood the instructions correctly then. Judging by the blogpost I thought I didn't have to create a map. I thought a developerblock of type 'presave' would just do the work, returning the name of the JS function to be executed along with parameters.