To make other fields mandatory in list view, after a choice field with value 'enable' is selected and submitted in list edit.

kalyani23
Tera Contributor

Hi, 

I want to make other fields as mandatory in list view, after I changed one choice field value to enable in list edit.

I tired data policy, but in that case its throwing that mandatory fields required error message when I do list edit, without allowing the new list edit value to get submit.

I also tried on cell edit client script, in that case also, its not allowing to change the value to 'enable' .

My requirement is when i change the value to enable and submit in list view, only then other fields should became mandatory.

Can u please suggest how to do it..Thanks in advance.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Please use before update business rule and inform user about the fields which are not populated

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Please use before update business rule and inform user about the fields which are not populated

Regards
Ankur

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

Hi Ankur,

If we use BR and give info message, incase user miss to fill those fields, still the record gets updated as the the fields are not made to mandatory. So how can we fix this can u please suggest.

Hi,

you can use abort action to stop the update

current.setAbortAction(true);

Regards
Ankur

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

Thanks, that BR with info msg is alone useful , as i dont required to abort action ,so that  choice field value can be changed to enable.