How to detect form changes in UI Action

Dev68
Tera Contributor

Hi all, 

Would like to know how we can detect if there is any field change on the form, when a UI action button is clicked. 

I tried to use current.changes(); but this is not supported in UI Action, the same with GlideScriptRecordUtil which is not supported for scoped application. 

 

Regards, 

Ram

1 ACCEPTED SOLUTION

@ram68 

You can use this logic for scoped application

It worked well for me earlier

How to get Changed or Modified Fields in ServiceNow Scoped Apps?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

11 REPLIES 11

tried similar in PDI and working as expected

find_real_file.png

find_real_file.png

 

You can check the length of the array returned by gru.getChangedFields() above to check if any field value changed.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Dev68
Tera Contributor

GlideScriptRecordUtil is not allowed in scoped applications.

So i cannot use this in UI action. Any other way, please let me know.