UI Action not working

Deepika Mishra
Mega Guru

I have an UI Action which set values for a field and then using g_form.save() , saves the form. This is working absolutely fine with admin user but with other user it is not working as per expectation.

 

g_form.setValue('state', '5');
g_form.save();

 I added alert in order to see what value it is setting, so the value gets captured properly but after saving for a fraction of second it will show State = '5' (Completed), but once the form loads it takes the previous stored value of the field. I don't have any role specific arrangement for this UI Action and neither does have any client script/BR running behind.

Please let me know how can I fix this. 

8 REPLIES 8

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Deepika Mishra ,

 

Please check if there is any Client scripts/BR running on background to check if the user is having any role is member of any group then it is restricting that. Also please check the UI policy scripts as well.


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Hi @Gunjan Kiratkar ,

I have checked all possible script and nothing is getting triggered (For this I deactivated all script), but still the issue persist. Also there is no role specific code.

HI @Deepika Mishra 

Just do one thing in order to debug this.

Open script debugger from application navigator

GunjanKiratkar_0-1669718485821.png

Click on script tracer and start script tracer

GunjanKiratkar_1-1669718563666.png

Then minimize window and click on the UI action. You will get all the scripts which are running while performing that action with line numbers and you can identify the issue from here.


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Really appreciate @Gunjan Kiratkar  but this also didn't help. I don't understand how it is working for admin but not for others.