Restrict Low-Priority Incident Creation via Point of Entry Field in Emergency Change

nandini29
Tera Expert

Hi All,

In the Emergency Change form, there is a field called Point of Entry, which is intended to accept high-priority incidents only. Normally, this field does not accept low-priority incidents. The lookup list for this field displays only high-priority incidents; however, when users use the New button from the lookup list, they are able to create low-priority incidents. Consequently, the Point of Entry field ends up accepting low-priority incidents through this method.

We need a way to restrict the creation or selection of low-priority incidents from the lookup list so that the field enforces its high-priority restriction consistently.

nandini29_1-1766064042731.png

 Can some please suggest what will be the best solution for this?

 

16 REPLIES 16

Yes exactly

@nandini29 

if your users are satisfying Table.None CREATE ACL on incident then they will see New button

-> when users click on Lookup Icon

-> right click on list header and add Script in Omit New Condition

Note: ensure you give this in your script, I used problem_id field on incident, you replace with below in your one

change_request.u_associated_incident
if (RP.getParameterValue('sysparm_view') == 'sys_ref_list' && RP.getParameterValue('sysparm_target') == 'incident.problem_id')
    answer = true;
else
    answer = false;

AnkurBawiskar_4-1766069017802.png

 

Output: New button is gone in reference lookup but still shown in normal table list

AnkurBawiskar_2-1766068965251.png

 

Normal list shows 

AnkurBawiskar_3-1766068987429.png

 

 

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

I implemented this solution earlier, but client didn't accept this as hiding new button is not the better solution. Is there any other way to do this

@nandini29 

why hiding New button is not better solution?

It's better solution rather than playing with the ACLs

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

I have added below condition on UI Action - New on normal list
&&!(RP.getParameterValue('sysparm_target')=='change_request.u_associated_incident')