servicenow core is not on this customers instance delete multiple records through flow designer

cchacha
Mega Guru

Hi,

 

So there is a catalog item which uses a flow from flow designer. the problem is that only one record can be deleted not multiple at a time unless script action can be used on flow designer. This client does not have the spoke servicenow core so  they dont have access to use script action.

 

the catalog item is one where users are removed from multiple groups at once, hence the group member records of this user are deleted.

 

Thank you for the help in advance,

 

Carol 

 

1 REPLY 1

Rajesh Chopade1
Mega Sage

Hi @cchacha

You can use the lookup record action in flow designer to fetch all group members. 

Then utilize 'for each' action in flow designer to loop through the retrieved group member, for each record in the loop use 'delete record' action.

Follow below steps to achieve :

Lookup Records:

  • Query the Group Members (sys_user_grmember) table for the user whose memberships need to be deleted.

For Each:

  • Loop over the group membership records returned from the lookup.

Delete Record:

  • In each iteration, delete the group membership record using Flow Designer's Delete Record action.

 

I hope my answer helps you to resolve your issue, if yes please mark as correct & helpful.

thank you

rajesh