In the related list I want keep this condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 05:18 AM
I have created a button in incident to create request and also created a related list for this request but in this related list all request are showing but i want only for one particular incident i want that related request only in the related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 05:29 AM
How did you create the related list? How are you relating the incident with the request? You are only sharing the result, not how you got there. It looks like you just have a list with requests or maybe a list with requests related to an incident, but definitely not the requests where xxxx-field is current.incident.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 05:32 AM
I have created a button to convert an incident to request after that I have to show that request in the incident in related list and I have created related list from relationships
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 06:09 AM
That doesn't answer the question on how you are relating the incident with the request. Do you have a 'parent' or 'incident' field on the request, to show that relation?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 05:49 AM
Hi @harsha vv ,
if you are created a relationship for this requirement. Use below code to query the particular request.
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
//parent.sys_id is the incident sysid
current.addQuery('parent', parent.sys_id); //parent field will have the related incident record
})(current, parent);
ServiceNow Community MVP 2024.
Thanks,
Pavankumar