- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 08:01 AM
Hi All,
We have a subflow which looks at our certificates and checks if any have expired or are close to expiring. If there are certificates in this state then an incident is created.
it is currently set up to use the input > certificate ci > assignment group to fill the assignment group field on the incident record. However, not all certificates have been updated to contain an assignment group. Therefore incidents are being created which have no assignment group and therefore could be missed/lost and a certificate could expire without anyone knowing.
Therefore, I am trying to edit the flow to fill the assignment group field using either the assignment group from the certificate ci OR use a default group which will look after certificates if not assigned to another group. In this case it is called 'Service Operations'
I have tried to script this request but haven't had much luck so far. It appears what I have coded is now preventing an incident being created all together.
I haven't done any coding in flow designer so I am a bit lost, any help would be amazing.
Thanks
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 03:49 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 08:06 AM
Hi,
You can use something like this:
if (fd_data.trigger.certificate_ci.assignment_group) {
return fd_data.trigger.certificate_ci.assignment_group;
} else {
return gs.getProperty('name_of_property');
}
Then you can create a system property as string to house the sys_id of the Service Operations group.
The above assumes your fd_data.trigger... is correctly formatted (I just used what you supplied). You can dot-walk to this by typing fd_data. and you'll see the referenced data show up and continue to dot-walk to get you where you need to go.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 01:10 AM
Hi Allen, Thanks for your reply.
Would the if statement always evaluate to true here? as even if the result is empty there is still that field on the record that is being looked at.
Thanks
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 03:49 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 09:39 AM
Hi
I felt my reply would have guided you Correctly, as that was the goal and not trying to give you literal code, that's something you can handle on your side. I'm unsure if you actually tried my suggestion first.
In any case, if the trigger.certificate_ci.group blah blah was retrieved and resulted in null/empty, undefined, it would not pass that if check and result to else. That's standard javascript type outcome.
Then, the goal was to not hard code the sys_id and associate it to a system property and go from there.
It seems you've marked your own reply as Correct. All questions on the forums posted by someone who then eventually gets guided Correctly, would have their own outcome as Correct, thus none of our replies would be "Correct".
In any case, if that's what worked for you, then great, if my reply helped guide you...Correctly, please mark that as Correct. As it was about the guidance, not the literal code, but...it's your post 😉
Take care!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!