- 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
why would you close the INC?
If you still require use GlideAjax here and mark the INC as closed/resolved.
Do remember Resolution Code and Notes are mandatory during INC closure/resolve so set those fields properly
function onClick() {
var result = g_form.submit('sysverb_ws_save');
if (!result) {
//failed form submission
return;
}
result.then(function() {
// GlideAjax here
var params = {};
params.sysparm_parent_table = "incident";
params.sysparm_parent_sys_id = g_form.getUniqueValue();
g_service_catalog.openCatalogItem('sc_cat_item', '-1', params);
});
}
💡 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
@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
yes either put it in Declarative Action or use after insert BR on REQUEST table
💡 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
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
