How to auto populate requested for on the request form when it is created from an incident(caller_id)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 11:32 AM
How to auto populate requested for on the request form when it is created from an incident(caller_id)
Incident form
when clicked on create request button , service catalog opens and when we select a catalog item
I want to display the requested by field with the caller_id field from Incident form.
please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 02:01 PM
Hi Rahul,
Without looking at an instance I would say this is a UI action on the incident form, lookup the ui action, see what it does to open the request and send the data along.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 02:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 02:32 AM
Hi,
you can do this
UI Action Code:
gs.getSession().putClientData('requested_by', current.caller_id);
onload Catalog client script on that catalog item
var requestedByUser = g_user.getClientData(''requested_by');
if(requestedByUser != ''){
g_form.setValue('variableName', requestedByUser);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 04:40 AM
i am not looking for specific catalog item, the catalog item can be anything. but the requested by field should auto populate the caller_id value