UI Action (button) for specific SYS ID

AdamUMC
Tera Guru

Hi,

I have a "sys_template" (Incident template) for which I have made a new button.
It's actually the same button as hidden behind the hamburger- icon ("Insert and Stay").

Now I want this button to be available for only this specific template. I have tried several conditions within the button's UI Action, but nothing seems to work. How can I solve this problem?

I have tried:
- Condition = sys_id=a0a80ee597676110b4fbb1e3f245986f^EQ (does not work)

- Condition= template=[[OB]] -^EQ (does not work)

- Condition = name=[[OB]] - ^EQ (does not work)

Thanks in advance!

1 ACCEPTED SOLUTION

@AdamUMC  
current.getUniqueValue() == 'ur_template_sys_id'.So the Ui Action would only show on that particular template.
If my response helped please mark it correct and close the thread

View solution in original post

26 REPLIES 26

Mehta
Kilo Sage
Kilo Sage

In template make sure you are trying to populate one particular field like correlation id = Template. So that it can be used as unique identifier for your ui action. 

 

This field can be used in UI Action to make it visible for template only. 

 

If this resolves your query, please mark it as correct or helpful.

Thank you. And how this condition will look like then? 

EDIT: BTW, SYS_ID of the template is a unique identifier as well. Why that does not work?

Because sys_id for each record in servicenow is different. 

The template sys_id is to identified record uniquely on template table whereas you are trying to put conditions for incident. 

 

You can use current.fieldname == "as per template value" in condition for ui action.

@AdamUMC 

 

were you able to resolves this ?