sfdx-package-generator
sfdx-package-generator copied to clipboard
Page Layouts in Packages not pre-fixed
Hi,
Great package ! I've noticed that page layouts as part of a package are not properly pre-fixed. The tag should be [package prefix][object name].[package prefix][layout name], but the sencond package prefix does not appear, so when trying to retreive metadat from Org, it doesn't get pulled
Thanks !
Hi @rjozeau , Please send me a sample page layout name along with package name like how to you want it to be. I will try to slot it in.
Hi @vignaesh01 thanks for your reply :) For managed packages, there's a prefix For the object name, this works properly in the package.xml generator --> [prefix]__[ObjectName]__c For example : SBQQ__Quote__c
In the same package, we have standard (from the package) layouts on some objects, and we need layout names to be prefixed too --> [prefix]__[ObjectName]c-[prefix][LayoutName] For example, we have SBQQ__DiscountSchedule__c-SBQQ__Discount Schedule Layout and the package.xml generators gives SBQQ__DiscountSchedule__c-Discount Schedule Layout
My team and I are also having this issue with the Financial Services Cloud Page Layouts. I've attached an image from VS Code. Line 4 is what is returned from the package generator, and line 5 is what correctly retrieves the layout from the org. I hope this helps!
Hi, I'm also having this issue. Example: Declarative Lookup Rollup Summary package is installed (prefix DLRS).
If I choose the layout "Lookup Rollup Summary Layout" of the object dlrs__LookupRollupSummary__c, the generator produces this line:
<members>dlrs__LookupRollupSummary__c-Lookup Rollup Summary Layout</members>
However this will not retrieve properly unless it is an unpackaged layout for the packaged object. The correct syntax to retrieve a packaged layout for a packaged object is like this:
<members>dlrs__LookupRollupSummary__c-dlrs__Lookup Rollup Summary Layout</members>
It is also possible, although this is less common to have package X depend on package Y and contain a layout for an object located in package Y. In that case the syntax would look like:
<members>prefixY__ObjectNameFromY__c-prefixX__LayoutNameFromX</members>
This is a bug within the SF metadata API, not the extension. Several components will be listed without (inner) namespace prefix, including
- CustomMetadata
- GlobalValueSetTranslation
- Layout
- QuickAction
See https://github.com/forcedotcom/cli/issues/1697