Flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 03:27 AM
Hi All,
I created a flow with trigger conditions such as that whenever additional comment changes then a new hr case should be created. But i want to call the flow by using the ui action only , even if the trigger conditions satisfy it should not create a HR case .Is this possible.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 03:31 AM
This is strange... there can be numerous comments changing and why do you need to create case on every comment change? whats the business requirement can you explain ?
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 03:33 AM
Hi @Sohail Khilji ,
Only after the case is closed complete if a additional comment is inserted then a new case should be created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 03:37 AM
can you explain ?
You can create a business rule or a Flow which start or trigger conditon as if state is closed complete and additional comments changes.
if so, user create record action to create a record and you can do the lookup of old record to copy its existing values. (Why dont you re-open the same case rather creating a new case) ?
Were are you struck, did start with anything ?
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 03:35 AM
@kali In this case you should create a sub-flow instead of the flow and trigger the sub-flow via UI Action script. Here is an example on how you can trigger a subflow via script.
Here is the script which can be used for this purpose.
(function() {
try {
// Start Asynchronously: Uncomment to run in background. Code snippet will not have access to outputs.
// sn_fd.FlowAPI.getRunner().subflow('sn_hr_core.<Provide name of subflow>).inBackground().run(); //Name of the subflow
// Execute Synchronously: Run in foreground. Code snippet has access to outputs.
var result = sn_fd.FlowAPI.getRunner().subflow('sn_hr_core.<Provide name of subflow>).inForeground().run();
var outputs = result.getOutputs();
// Current subflow has no outputs defined.
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();
Please refer to https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer... for more information.