Flow Designer

s7
Tera Contributor

Hello 

 


can we use flow designer on deletion of members on group member table and if no members manager should be included as a member??

1 ACCEPTED SOLUTION

Hi @s7 ,

Sorry my bad. We don't have any delete trigger.

You cannot trigger flow for delete operation because record is not available.

We cannot achieve with this using flow.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

View solution in original post

4 REPLIES 4

Pavankumar_1
Mega Patron

Hi @s7 ,

Yes, you can create flow to automate this process.

Below is we can achieve from business rule.

Create business rule on sys_user_grmember when record deleted as trigger point.

similarly you can start building the flow.

On Flow you need to use Lookup records action like we are using GlideRecord on Business rule.

 

Business rule Script:

var grps = new GlideRecord('sys_user_group');
grps.addQuery('sys_id', 'current.group'); // sys_id to test for particular group which record is deleted
grps.addActiveQuery();
grps.query();
if (grps.next()) {
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group', current.group);
grmember.query();
if (!grmember.hasNext()) {
if (grps.manager) {
grmember.initialize();
grmember.group = grps.sys_id;
grmember.user = grps.manager.sys_id;
grmember.insert();
}
}
}

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Pavankumar_1
Mega Patron

Hi @s7 ,

If your issue got resolved please close the thread by accepting the solution. Then others will refer this and get benefited.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Hi @s7 ,

Sorry my bad. We don't have any delete trigger.

You cannot trigger flow for delete operation because record is not available.

We cannot achieve with this using flow.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Pavankumar_1
Mega Patron

Hi @s7 ,

If your issue got resolved accept the solution and hit thumb icon.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar