Display RITM variable on Appoval form from service portal for end User
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hello community,
here i have admin role, so that i can see the ritm variables from Approval form from serviceportal
when the end user opend approval form, he cant see ritm number and variables
how to fix this?
here my requirement is to display ritm number and variables to the end user for Approval form
please help me with this.
thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
didn't get your point.
End user will raise request and he/she will be the approver?
but why?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
or please let me know if the user is having only snc_internal role
does he able to see the ritm variables from Approval form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I am not convinced with the business requirement.
Please check the ACLs and debug using access analyzer
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Try this acl based fix @SravaniP7164971
The cleanest solution is creating ACL rules so approvers can naturally read the RITM and its variables — no widget customization needed.
Step 1: Create ACL on sc_req_item (Read)
Navigate to: System Security > Access Control (ACL) > New
| Field | Value |
|---|---|
| Type | Record |
| Operation | Read |
| Table | Requested Item [sc_req_item] |
| Role | Leave empty |
Script condition:
(function() {
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.sys_id);
gr.addQuery('approver', gs.getUserID());
gr.addQuery('state', 'requested');
gr.query();
return gr.hasNext();
})();
Step 2: Create ACL on sc_item_option_mtom (Read)
Same setup, but for the variables join table:
| Field | Value |
|---|---|
| Type | Record |
| Operation | Read |
| Table | sc_item_option_mtom |
Script condition:
(function() {
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.request_item);
gr.addQuery('approver', gs.getUserID());
gr.addQuery('state', 'requested');
gr.query();
return gr.hasNext();
})();
Step 3: Create ACL on sc_item_option (Read)
| Field | Value |
|---|---|
| Type | Record |
| Operation | Read |
| Table | sc_item_option |
Script condition:
(function() {
// Trace back to RITM through mtom
var mtom = new GlideRecord('sc_item_option_mtom');
mtom.addQuery('sc_item_option', current.sys_id);
mtom.query();
if (mtom.next()) {
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', mtom.request_item);
gr.addQuery('approver', gs.getUserID());
gr.addQuery('state', 'requested');
gr.query();
return gr.hasNext();
}
return false;
})();
