I am trying to automate the creation of scratch org using Cumulus CI where we are deploying the Education Cloud package, and we are successfully able to deploy the EDA as well as the unmanaged package associated with EDA.

Now as an admin, while creating Course Connection records, it doesn't ask for a Record Type (Faculty of Student) because it's not assigned to System Admin profile as below.

enter image description here

But is it possible that in the script (cumulusci.yml), once the scratch org is created, I can assign the record types to System Admin, so that I don't have to manually edit the Admin profile?

I have checked the tasks reference, but didn't get any valuable information: https://cumulusci.readthedocs.io/en/stable/tasks.html

  • 1
    n.b. tagging me in a question does nothing, but I watch the cumulusci tag.
    – David Reed
    Apr 26, 2022 at 1:50

1 Answer 1


You can do it in two different ways.

  1. You can capture a fragment of the Admin profile, just representing the profile Record Type assignments. You'd do this by setting up an org, performing all the configuration you want to do, then retrieving the Admin profile and the involved sObjects in a single pull operation. (You'd probably want to build a package.xml manifest to do so).

    Then, you'd trim down the retrieved metadata for the Profile to just those elements expressing the assignment of the Record Types (<recordTypeVisibilities> elements). You can deploy that metadata to assign the Record Types without otherwise mutating the Admin profile.

  2. You can use the CumulusCI Metadata ETL task update_admin_profile. This task accepts the option record_types, which has a complicated value:

     task: update_admin_profile
           - record_type: SOME_OBJECT.SOME_RECORD_TYPE
             visible: True
             default: True
           - record_type: SOME_OBJECT.SOME_OTHER_RECORD_TYPE
             visible: True
             default: False

    It's important to know, however, that this task does other things as well. Its primary purpose is to grant the admin profile FLS and CRUD access to all custom objects in the org. If you don't want that behavior, you shouldn't use the task.

    This task is quite tricky because it has many functions. If you're on a project created after CumulusCI 3.9.0 and you're not setting the package_xml option on the task, it should work fine; otherwise, you'll need to also set the include_packaged_objects option to True.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .