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

@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

The link was very helpful, it helps to detect the field changes.

Now there is one more issue, we cannot use confrim() in UI Action server side, is there a way out, to throw pop window to save or discard the changes from UI Action. 

Hi,

Glad that the link helped.

You cannot show the confirm box in server side and I don't think any other way to handle this

Regards
Ankur

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

@ram68 

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

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

Ahmmed Ali
Mega Sage

This link might help you.

 

https://servicenowguru.com/scripting/business-rules-scripting/checking-modified-fields-script/

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

Thank you,
Ali