return false is not working in UI Action

kinjal1
Kilo Expert

Hi All,

Requirement: When user hit on Context menu link, Alert message shows some required fields and without that user should not be able to  save the form. But here I am able to save the form without putting any value in these required fields.

In below script line no 17 Return false is not working. 

Addition : I have also configured UI Policy to make field mandatory.

Issue is if I don't fill any value in these fields, still form getting save.

Please help me with scriptfind_real_file.png

Thanks in Advance

6 REPLIES 6

Allen Andreas
Administrator
Administrator

Hi,

Is this UI Action set for client? By checking client box?

Is the alert working?

From this, you have the submit sitting outside of everything else so it's going to run regardless of true or false.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

It is a UI Action and Client is true. 

Still not working

find_real_file.png

Jyoti8
Kilo Guru

Hi Kinjal,

 

These links might help you.

https://community.servicenow.com/community?id=community_question&sys_id=875bc721db9cdbc01dcaf3231f96...

 

https://community.servicenow.com/community?id=community_question&sys_id=cfa15b6ddbdcdbc01dcaf3231f96...

 

If I have answered your question, please mark my response as correct and/or helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

AbhishekGardade
Giga Sage

Hello Kinjal,

Can you post a code here? So I can reproduce a issue issue and fix on my instance.

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade