- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
OOB there is a ui Declarative action called Create request in the incident table for Sow.
once clicked on it it asks which catalog item you want to order once you select and submit it creates one request.
My need is once a request gets created it should close the incident from where we have navigated and created the request.
below is the declarative action code:
How i can achieve my requirement ? @Ankur Bawiskar any idea?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar ,
I tried the below whenever a request gets created from incident the parent field in the request gets updated.
i created one after business rule on request table putting the conditions as parent is not empty and class name is incident and below is the script to close the incident.
Yes before closing the incident we definitely need resolution code and notes as there is a data policy.
Is this approach correct @Ankur Bawiskar ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I think you marked your own response as correct.
Would you mind marking my response as correct as I suggested approach and also validated your current approach?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @Ankur Bawiskar ,
continue to this when i click on create change request that value should get copied to the catalog item requested for variable.
Is this possible also the requested for variable in the item have default value as logged in user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
recently I shared solution on community question as well
Hi Team, In service operation Workspace under interaction record we have UI actions which is Create
I also created a blog for that check that and enhance
Invoke record producer within Configurable workspace, send parameter & fetch the value
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @Ankur Bawiskar ,
This is really good but one question in this way we need to create the on load catalog client script in all the catalog items right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
that's correct.
OR
You can create a variable set to hold Requested For and then write onLoad on this variable set and then include this variable set in your whichever catalog items you want
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I created an After Business Rule on the Request (sc_request) table with the following conditions:
parent is not empty
parent_table is "incident" (class name = incident)
When = After Insert
Business Rule Script
if (current.parent && current.parent_table == "incident") {
// Retrieve the parent Incident
var inc = new GlideRecord("incident");
inc.addQuery("sys_id", current.parent);
inc.query();
if (inc.next()) {
// Close the Incident
inc.state = 7; // Closed
inc.close_code = "Resolved by request"; // Resolution code
inc.close_notes = "Request " + current.number + " created";
inc.update();
}
}
