Non-Global scope Role deletion via Global Flow

rajsurve4399
Kilo Contributor

Hello,

 

We have a requirement to delete few non-global roles of a user based on his employment type change. The flow works great, until it reaches delete record action, where if it finds a non-global role which needs to be deleted, it throws error 'Unknown error occurred while deleting the record'. We are using lookup records action on table 'sys_user_has_role'. I verified this by going to that table, with global scope, and yes, it does not allow to delete from Global scope, but it does allow if we go to the role's scope. I also tried using custom action script step

Delete Record action error.png

to delete the record, yet is doesn't work. Can someone please give me a workaround or an alternative that I can use in the flow I have configured. Please refer below screenshot attachment.

 

Thank You.

0 REPLIES 0