Skip to main content

I'm having a problem with the admin profile, I think.

I've pulled down the admin profile, and I get a conflict with the dx_push task of the dev_org/qa_org flow. It's a pretty plain flow,. Make an NPSP org, custom add_currencies task, and load_dataset task. (I understand the source of the conflict as the dx_push is after the update_admin_profile task has already modified the admin profile)

- If I have the admin profile in my metadata, dx_push fails. I can force the sfdx push, and manually tun the add_currencies and load_dataset tasks with no issues.

- If I don't have the admin profile, dx_push task works but load_dataset task fails, due to a record type not being valid for the user:

"INVALID_CROSS_REFERENCE_KEY: Record Type ID: this ID value isn't valid for the user: (18char sf id):RecortTypeID --"

This is on a custom object with multiple record types.

As far as I can tell, the 18char SF record type id is correct in the sample.sql. I can see it in the record inserts, and the matching id in rt inserts.

4 个回答
  1. 2020年9月10日 20:56

    @Seth Vanderdrift​ The update_admin_profile task has an option for setting record type visibility. I'd recommend using that instead of including the whole Admin profile in your package metadata because it's a little more robust to differences that can exist between orgs in terms of which exact permissions are available (as well as to avoid the conflict). To specify the record types that update_admin_profile should make sure are visible, add a section like this to cumulusci.yml:

    tasks:

    update_admin_profile:

    options:

    record_types:

    - record_type: Custom_Object__c.RecordType1

    default: true

    - record_type: Custom_Object__c.RecordType2

0/9000