Hi @Sam27: Can you please help to understand if this request is for PROD / test environment? If this is for PROD, it is not ideal to delete the profiles because there are chances that users have cases assigned to them and there can be inflight cases which are supposed to be routed to the user (based on your business logic). So please perform a IA before deleting the users.
If this is for test environment, you can write a simple activity to delete the operator records (or) delete the records from DB (if you are deleting from DB, consider the other index tables too). Also consider AdditionalAccessGroup of the users. There can be chances that one user can have multiple access groups.
Hi Sam, What Arul said is absolutely right follow it before you are deleting the operators and ensure the rules are not checked out. Find the steps of the activity below.
Create a report definition rule in Data-Admin-Operator-ID class and get pyUserName, pyAccessGroup, pzInsKey in the filter column, and pass the access group as a parameter.
Call the report definition in the activity using the call pxRetrieveReportData and pass the parameters for the report in the previous steps.
Loop the report results and get the pzInskey then pass it into Obj-Delete-By-Handle then do Obj-Save with the write now option enabled.
Note: Pass the access group as a parameter in the activity so that at the runtime you can provide the access group for which you have to delete the operators.
You can use the Obj-Browse step instead of the report definition also. Hope this helps
@Sam27 As Stated by @LakshmanAR you can follow the steps by passing the parameter access group value having those 300 users using step 4 Obj-Delete-By-Handle like key value “Data-Admin-Operator-ID”+" "+Param.UserID
@RameshR1500 Can you help me what is written in step4 Property-set. I might sound silly but not sure what is missing
Please find attached image -My activity is not passing inside loop though having one operator jumping from step 3 to 5 it’s not passing through 4 operations
Deleting an operator with an AccessGroup mapping (Only one mapped) or Deleting an Operator with Specific AccessGroup when multiple accessgroups are mapped with that operator ID are 2 different requirements. The below solution which our forum mates should solve your issue unless you did not specify your requirement precisely.
Make changes in the utility prepared already to perform the operation of your actual need is identified.
@HariPriyaY Thanks for your response - I already tried this to and it does not worked. I am really not understanding why its not going inside the loop. Not sure what is the issue here PFA
Thanks for your confirmation. You can try creating a report defitnion to perform the operation and use the Access group and additional access group fields in the definitons will serve your requirement. We can connect offline too, if you need any further help from me.
Tried my Best. DId not find any Direct Utility to serve your need. Through RD and creating Custom function, Not able to achieve your requirement. You’ll need to contact your Pega Admin / Database Admin to write an SQL Query (Simple Way) to perform the action.
Eventually, If you find any utility to serve your need, Please update here too.