CumulusCI icon indicating copy to clipboard operation
CumulusCI copied to clipboard

Add ability to define page layout assignments with record types using the update_admin_profile task

Open GeekStewie opened this issue 2 years ago • 2 comments

Feature Type

I'm interested in extensions to existing CumulusCI functionality (e.g., broader applicability of an existing Task or Flow).

Does your feature request solve a current problem?

At the moment we have to define these in an profile xml file within the deployment which has the layout assignments defined with the record types. Like this:

<layoutAssignments> <layout>Account-npsp__Organization Layout</layout> <recordType>Account.Organization</recordType> </layoutAssignments>

Describe the solution you'd like

The update_admin_profile task is already doing most of what is needed, so if we could simply add the page layout assignment (if there is one) along with the record type, like so:

update_admin_profile options: include_packaged_objects: true api_names: - Admin - Standard record_types: - record_type: "Account.Organization" - record_type: "Account.HH_Account" page_layout: "Account-npsp__Organization Layout" default: True

Describe alternatives you've considered

Already mentioned in problem description.

Additional context

No response

GeekStewie avatar Apr 20 '22 13:04 GeekStewie

Just so I'm tracking the yaml spacing here and children, this is the expected / hoped-for configuration?

update_admin_profile:
  options:
    include_packaged_objects: true
    api_names:
    - Admin
    - Standard
    record_types:
    - record_type: "Account.Organization"
    - record_type: "Account.HH_Account"
        page_layout: "Account-npsp__Organization Layout"
        default: True

dcinzona avatar Apr 20 '22 13:04 dcinzona

Yes, thanks for cleaning that up

GeekStewie avatar Apr 20 '22 14:04 GeekStewie