- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 12:30 AM
I want to create a UI action which will appear only on change_task .
Name of the button DELETE change task
It will appear for the change_manager role and if Task corelation_id = = blank
How t do this ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 12:34 AM
Hi,
follow these threads:
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 12:34 AM
Hi,
follow these threads:
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 12:34 AM
Go to UI actions
Create a UI action named Delete
select table change_task
under conditions mention
//check field names
gs.getUser().hasRole("change_manager") && current.task_correlation_id==''
Under Script you can add code to delete after confirmation. You can check out any available OOB ui action delete and replicate the same functionality in your custom ui action.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 12:48 AM
Hello,
Please create UI action like the Below image.Dont forget to click on "Form Button" checkbox.
If want ore help in coding. Please keep posted.
Please Mark it helpful/correct if my answer helps in any way to resolve your query.
Reach out to me if any more help required.
Regards
Yash.K.Agrawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2020 12:51 AM
Please follow this steps
1) go to this OOB Delete UI Action
URL: https://instanceName.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=1f12506f7f532200348ef0d8adfa9139
2) change the table name from global to change_task
3) in condition add this part along with existing condition
gs.hasRole('change_manager') && current.task_correlation_id == ''
4) Perform Insert and Stay
This will override the UI action and create new one for your table
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader