cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict triggering validation script

Former Member
0 Kudos

Hi All,

As part of my project requirements i wrote one document lifecycle script, with target as Validated for Supplier (607) class. Which is working fine.

My question is when i update supplier record from explicitly called script and call Save method to save the changes, in the background, above validation script is triggering. I dont want that. Any idea how to deal this situation?

Thanks

Chaitanya Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Chaitanya,

How are you executing the Explicitly Called Script. Hope it is with a Scheduled Task setup to Run via Enterprise user or a specific user

In either case, update the validation script as follows

currentUser = session.getAccount().getUserName();

if (!currentUser.equals(???) {

All your existing logic

}

In the If condition check if the session user is not your Scheduled Task user then execute your code. Else bypass the entire Validation logic

Hope this helps

Regards,

Balaji

Former Member
0 Kudos

Hi Chaitanya ,

What is that you are trying to achieve by Validation script , Check if its possible to convert that to a field validation instead of document validation else try to write the document validation script in a if condition and make it execute only for a specific event if the event can be identified.

Or if your schedule script is a one time activity or so , you can just inactive the validation script for some time and run it as I dont see a way to stop other script from being triggered.

One more thing you can do it is try to inactivate the script from your explicit script and then activate it once your explicit script executes. Dont know if IAPI are exposed for inactivating scripts ..

Let me know if it helps you.

Thanks

Uday