Call a script Include from UI Action

hadron_collider
Tera Contributor

Hello!

 

 

Im working on a functionality that will allow to change the status of a record when a button is clicked.

 

I have an UI Action (client) so that when the button is clicked 'reason for reject' shows up and is set to mandatory:

kata90_0-1704814723056.png

 

 

I want the approver to be obliged to provide 'reject reason' to be able to change the status to 'rejected'.

 

Here is my UI action:

 

kata90_1-1704814816919.png

 

is it possible to call Script Include that will handle the logic of the record update? (changing the field value to 'rejected' and adding the 'reject reason').

 

 

Thank you in advance!

 

1 ACCEPTED SOLUTION

I corrected this in my reply above, see this

if( g_form.getValue('u_activity')== ''){   // this if was wrong
return false; //Abort submission 
}
-Anurag

View solution in original post

15 REPLIES 15

@hadron_collider 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers and it has an alternate solution.

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