CoreBOSBB
Will validations run on webservice calls? - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18)
+--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4)
+--- Thread: Will validations run on webservice calls? (/showthread.php?tid=1434)



Will validations run on webservice calls? - Guido1982 - 03-15-2019

I've asked this before in Gitter and have forgotten the answer, so here is an attempt to get this more permanent.

My goal is to write a custom validation that will only allow setting salesorders to a certain status when specific conditions are met (will write custom code for this). But when someone changes the status through webservice, will that validation be run as well? Or will someone through webservice be able to change a status where I wouldn't allow that to happen inside the app?


RE: Will validations run on webservice calls? - joebordes - 03-17-2019

No, they will not. In order to execute validations before Create Update operations you must use the web service endpoints:

CreateWithValidation
UpdateWithValidation
ReviseWithValidation


RE: Will validations run on webservice calls? - Guido1982 - 03-18-2019

Ah yes that was it, thanks. Will that also work for Revise, Update?


RE: Will validations run on webservice calls? - joebordes - 03-18-2019

yes, use:

UpdateWithValidation
ReviseWithValidation


RE: Will validations run on webservice calls? - Guido1982 - 03-18-2019

Nice, thanks