How to give display message in case form using flow designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 04:42 AM
Hello Community;
I created one flow designer. it is successfully run. But I want to show(alert/display) flow designer output in form form. So copy the code from code snippets in flow designer and then make a business rule. But this business rule not trigger.
Condition is - after, update
How to display flow designer output(resolvetime) in case form?
(function executeRule(current, previous /*null when async*/ ) {
try {
var inputs = {};
inputs['current'] = new GlideRecord(); // GlideRecord of table:
inputs['changed_fields'] = current.short_description; // Array.Object
inputs['table_name'] = 'sn_customerservice_case';
Start Asynchronously: Uncomment to run in background.
sn_fd.FlowAPI.startFlow('sn_customerservice.predict_resolve', inputs);
// Execute Synchronously: Run in foreground.
//sn_fd.FlowAPI.executeFlow('sn_customerservice.predict_resolve', inputs);
var variable = outputs['resolve_time'];
gs.addInfoMessage("Resolution time is" + variable);
} catch (ex) {
var message = ex.getMessage();
gs.error(message +" not display message");
}
})(current, previous);
Thanks & Regards;
Harsha
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 09:51 AM
Hi,
Flows are "Async" in nature means their execution is not real time and hence I doubt there is anything to inform back to user.
Check this link below, i guess it shows some sort of alert from Flow Designer, might help
https://community.servicenow.com/community?id=community_blog&sys_id=af1c919edb1f67406c1c02d5ca961908
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 10:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2020 01:07 AM
Hi,
You can easily do it out of flow designer.
You can easily do it via an on submit client script or via business rule that runs on insert of the record.
-Anurag