Not able to update catalog task state using custon ui action by end user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 11:33 PM
I created a custom ui action in sc_task form with some logics, including updating the state field to closed complete on clicking it. But it works as expected if the user has admin role. But when agents( who has no admin role) clicks other logics are working but state is not getting closed completed in sc task form. Any help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 11:53 PM
is that user manually change from form?
Is that user able to click Close Complete on SC Task and what happens?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 11:55 PM - edited 07-02-2025 11:59 PM
@Ankur Bawiskar The user can change state manually, but my requiremnt is to update when the custom button is clicked . Also if the same user clicks OOB 'Close Task' ui action button the task is getting closed .
But as admin if i click the custom ui action, The state is updating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 12:03 AM
why are you using glideRecord to update?
why not use current object?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 12:06 AM
Hi @Sharath807 ,
The issue might be with alm_asset table the non admin user might no be having access to this table, can you check if this user have the permissions to update this record using access analyzer ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2025 12:09 AM
@Ankur Bawiskar while using current object...Getiting errors like.
1.Invalid update
2.Failed to close the task. Please allocate the selected asset by clicking the "Assign Asset" button.
3.gs.addInfoMessage('Asset <b>' + current.u_asset.display_name + '</b> allocated successfully to <b>' + current.request.requested_for.name + '</b>');