Unable to insert record in group member table through script step in custom action in a flow

Rohit Agarwal1
Tera Contributor

Hi,

 

I am not able to insert record in group member table through script step in custom action in a flow. I am using below script:

            grpMember.initialize();            
            grpMember.group = 'sys id of group';
            grpMember.user = 'sys_id of user';
            grpMember.insert();
 
Same script is working fine in background script. Any idea/suggestion?
2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Rohit Agarwal1 

are you sure you are sending the sysIds for group and user correctly?

your flow is in which scope? If in other scope then possibly cross scope issue might be restricting the insertion

your flow is running with which user? Make it run as System user

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

Yes, I am sending the sys ids for group and user. As I mentioned same script is working fine in background script.

Flow is in global scope and running as System user. It was working fine before. I am facing this issue after xanadu patch 4 upgrade.