Skip to main content

Hi - We are looking to add a Role to a 2GEN Unlocked package. To add this Role, we also need to add its hierarchy as each role references a parent up to the top 'Admin' role which does not.

 

When creating a new package version we are getting errors such as:

field integrity exception: unknown (Case access level below organization default) field integrity exception: unknown (Opportunity access level below organization default)  

The roles have either view or edit access: 

Opportunity Access | Users in this role can view all opportunities associated with accounts that they own, regardless of who owns the opportunities Case Access | Users in this role can view all cases associated with accounts that they own, regardless of who owns the cases

 

I  tried using unpackagedMetadata in the sfdx-project.json file and added Account, Case, Opportunity objects. We don't want those objects within the package. But am still getting those same errors.

 

Is this the right approach? How can I overcome the errors?

 

Thanks.

5 条评论
  1. 2021年7月11日 22:22

    What does your role metadata look like for the package?  Have you experimented with not putting Case Access and Opp Access in the metadata?

     

    I haven't looked at our role meta for a while and I know we have the different Access Levels present but our Role metadata also has CaseAccessLevel but set to none.  We have NO case object in any of our Unlocked Packages and it packages just fine.  If you read the metadata type, the only Required field stated is Name (parent role optional and if needed.)

0/9000