This content has been marked as final. Show 7 replies
There are two ways that you can do this. Unfortunately, using an Action Script is not one of them. You can create a custom workflow app (using the API and either a Java or .NET app) that turns the validation off, runs the action script, then turns the validations back on. This is the preferred method.
A secondary way would be to build a time factor into the custom validation. The danger there is that if anyone goes in during the time when the validation doesn't stop the user, the user can do anything they want. Depending on whether your users work at different time zones (because of location), that may be an option for you.
I see. Thank you so much for your help, ALM! I'll look into the first method. We do have users that are on different time zones.
Try the following actions script:
Before the data load:
After Data load:
let me know.
Add an extra condition in the validation to allow the batch user to make the update. That way only the batch user will be able to make updates to this field and you will not have to turn the validation on and off.
If you know where the validations are enabled you can turn them off with the ChangeProp command by treating the validation as a local inheriting property and setting it's value to false. It's a common practice to maintain an action script that will disable all real-time validations in this way and then modify it to enable them. Several customers are generating these by maintaining export books that filter to nodes where at least one validation is defined to insure the action script is current and accurate.
Having said that, this would more typically be used for development or migration purposes. For a nightly process Richard's suggestion would be a better option.
That last post was me. I forgot that I had logged in with another account to update a SR...
Thank you so much everyone for your help. Richard, I did end up adding the exception for the Batch user in the validations like you suggested. It's working great! Thank you!