simulate Reference Quaifier onSubmit

KeDix
Tera Guru

I have a few fields with Reference Qualifier attached to them. Due to templates, users have some invalid values stored in them. I want to make sure that data is saved with only valid values.

 

How can it be done to simulate the ref qual on those fields before submit/save?

5 REPLIES 5

Brad Bowman
Kilo Patron
Kilo Patron

You'll have to call a Script Include via GlideAjax in an onSubmit Client Script, passing in the value of each field that needs checked.  The Script Include needs to be coded in such a way as to check the reference table for each field against the criteria in each reference qualifier, returning a message or certain value if any are invalid, then the Client Script can abort the submit if that value is returned.

https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet-updated/ta-p/2...