Skip to main content

We have recently started making use of permission set groups for a new implementation and we did a bit of work around them. 

 

However  we realized that if you have a new permission set group along with corresponding test classes which test those permission set groups, being passed as part of same deployment package, the test classes fail with the below error : 

 

INVALID_CROSS_REFERENCE_KEY, You can only assign users to permission set groups that have the "Updated" status

 

This error comes when the permission set group doesn't exist in the target Org, which is exactly how it is going to be for us in production.

 

When we reached out to Salesforce support, they said it was by design & we would need to breakdown the package into 2 parts, one containing the permission set group and another containing the actual test class and remaining code. In todays, day and age, everything is automated. Just for the sake of using PSG, we cant take such a big and tedious job of breaking the package.

 

I cant digest the fact, test classes being so core to what salesforce does have been ignored and we have been presented with a functionality which cant be pushed to production without breaking the package because test classes don't support it ? Has anyone else had a similar issue with PSG ? 

답변 3개
  1. 2025년 2월 14일 오후 3:51

    Was there any resolution to this issue?  

     

    We are going live next week and all our code is being validated against multiple mock sandboxes.  

     

    We did not face this in mock1  sandbox where we deployed the code with test class run. We ran the test classes after the code was deployed and they passed successfully. 

     

    However, I am facing the exact same issue when I try to validate our package in our mock sandbox2.  

     

    Please share your insights on how you tackled this situation. Splitting into two packages would be a nightmare for us. 

     

     

0/9000