Conditional script is not blocking save when logged-in user is retrieved
I created the below Read-Only Conditional script and applied it on Status attribute. It does not block the save operation saying 'State is not modifiable'.
But as soon as I remove the 2 lines (used to retrieve logged-in user) above the return statement, I can see the error 'State is not modifiable' and save operation is blocked successfully.
So, basically, the save operation is not getting blocked when the logged-in user is retrieved.
I also observed the same behavior in Validation script.
3 answers
The script uses unsupported API that, if at, all only works in the Web UI. I assume it fails, because one of the lines before the true fails and there is no try/catch around.
Hi Ralph,
Create a simple sample first. Read the documentation and the workshop carefully. For validation as well as conditions it is required to configure an advisor/pre-condition to prevent saving if an error or failed condition is detected.