- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2023 03:13 AM - edited ‎07-05-2023 07:54 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2023 06:06 AM - edited ‎07-04-2023 06:11 AM
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2023 01:36 AM
You should try this in new client script instead of editing in same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2023 02:02 AM
I solved the problem.
My template is located within the "sys_template" table, but there are a few "Save" buttons, a few (2) at the "sys_template" table, but also a few on another few tables.
I tested all UI Actions with the name "Save" that are available within the UI Action of this template (sys_template) and guess what? The UI Actiuon "Save" within table "sys_metadata" is the UI Action that is serving the "Save" button at the template. By disabling this UI Action, the button dissapears.
After extending the condition with && current.getUniqueValue() != 'a0a80ee597676110b4fbb1e3f245986f'
And enabling this UI Action, the problem was finally solved. The final condition is:
!(current.isNewRecord() && !current.canCreate()) && current.canWrite() && current.getUniqueValue() != 'a0a80ee597676110b4fbb1e3f245986f'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2023 02:27 AM
Hi AdamUMC
Can you mark my solution as Accept, As it will help other users to get better understanding with same scenerio.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2023 06:12 AM
Hi Adam,
Plz Write. current.template == 'sys_id'.
this in condition field of UI Action.
Mark my solution as Accepted, if you find it helpful.
Regards
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2023 07:45 AM - edited ‎07-05-2023 07:47 AM
Hi Samaksh,
Sadly this one does not work (now tested).
current.template == 'a0a80ee597676110b4fbb1e3f245986f' results in button dissapears when the sys_template with this sys_id is opened. If I open another template, the button is also not shown.