I have some Custom Metadata Types in a managed package.

I just noticed that CMT's have page layouts.

I can not see how I can add the CMT page layout or list view to my managed package. Is this possible? And how?

  • I can't see the CMT page layout under the existing list of page layouts and there doesn't appear to be a separate section for them either. There might be some hope when using second-generation managed packages. – Daniel Ballinger Sep 12 '19 at 20:05
  • That said, I see the page layout I'd made for managing the CMT records was implicitly added to the package anyway. – Daniel Ballinger Sep 12 '19 at 20:13

I found that the page layout I had assigned to the custom metadata type was implicitly included in the managed package.

It came in with "Included By" and then the name of the custom metadata type where it was assigned as the page layout.

More difficult has been handling changes to the page layout during package upgrades. Currently is appears to be limited as exiting layouts aren't upgraded - Add Option to re-deploy page layouts for custom objects when upgrading packages.

At this stage I'm experimenting with creating an entirely new page layout when changes are required and then making that the default page layout. This then picked up by the packaging process.

New installs will get this new page layout. However, existing installs will need to be manually remapped to the new page layout. In theory it would be possible to automate this with a post install script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.