Flow is not triggering from before business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 09:35 AM
Hi Team,
I need to call subflow in before business rule , the business rule is triggering but the subflow is not calling. Could anyone please help on this.
Thanks in Advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 09:41 AM
@abed123 Could you please post the code here which you are using to trigger the subflow? Also, do you see any error in system logs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 09:44 AM
Hi Sandeep,
Thank you for the reply. Please find the below code
Note: In the name of fieldName that is internal field name.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 10:14 AM
Hello @abed123 ,
The syntax looks good. But Can you check the below once.
It's possible that previous obj is null, especially when the record is newly created. You should check if previous obj exists before accessing its fields.
Similarly, you should verify that both previous and current records have the "fieldName" field before attempting to access it.
And also add exception handling for better debugging the issue.
try{
var inputs = {};
inputs['input1'] = current.getUniqueValue().toString();
inputs['input2'] = previous.fieldName.toString();
inputs['input3'] = current.fieldName.toString();
sn_fd.FlowAPI.getRunner().subflow('flowName').inBackground().withInputs(inputs).run();
} catch(Err){
gs.info("Error:"+Err);
}
Please Mark My Answer as Helpful and Accept as Solution, if you find this article helpful or resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 11:07 AM