How to delete multiple User Relationships record in workflow runscript ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2023 07:31 AM - edited ‎12-11-2023 08:23 AM
Hi All,
I want to delete multiple record in the User Relationship table by getting the ci from the variable in the cat item and users from a list collector type variable. I used the below run script, Its not deleting the multiple record. Can anyone help me on this ?
var dataCenter = current.variables.data_centre;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2023 07:54 AM - edited ‎12-11-2023 07:58 AM
Hello @ads ,
Can you please check the values of variable 'dataCenter' and removeRel . It should be sys_ids not the displayvalue.
For this line of code 'userGR.addQuery('sys_id', removeRel[i]);' and for the ' relDelete.addQuery('ci', dataCenter); ' you need to give the sys_ids. So please confirm that.
Kindly mark my answer as Correct and helpful based on the Impact.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2023 08:18 AM
Hi, I have not used the displayValue(). So It will get the sys_id, do you have any idea how to get the sys_ids from this line - 'userGR.addQuery('sys_id', removeRel[i]);'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2023 08:29 AM
@ads can you show me the values of varibles removeRel and dataCenter. I can write a code for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2023 08:33 AM
var dataCenter = current.variables.data_centre;