cli icon indicating copy to clipboard operation
cli copied to clipboard

force:source:manifest:create --fromorg creates manifest with missing namespace on CMT records and layouts

Open kalius opened this issue 2 years ago • 9 comments

Summary

When using force:source:manifest:create --fromorg, namespace is missing on managed Custom Metadata Type records and Layouts Side effect: If there are two CMT records with same developername but different QualifiedApiName (one managed and other unmanaged), only one is present in package.xml

Steps To Reproduce:

Step 1: Install any managed package with public (not protected) Custom Metadata Type record and managed Layout Step 2: Run sfdx force:source:manifest:create --fromorg org_alias -n package.xml -c managed

Expected result

<types>
	<members>namespace__Object.namespace__Layout</members>
	<name>Layout</name>
</types>
<types>
	<members>namespace__Object.namespace__Record</members>
	<name>CustomMetadata</name>
</types>

Actual result

<types>
	<members>namespace__Object.Layout</members>
	<name>Layout</name>
</types>
<types>
	<members>namespace__Object.Record</members>
	<name>CustomMetadata</name>
</types>

System Information

Tried in bash and cmd.

sfdx-cli/7.166.1 win32-x64 node-v16.15.1

kalius avatar Sep 02 '22 07:09 kalius

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

github-actions[bot] avatar Sep 02 '22 07:09 github-actions[bot]

Applies also to QuickAction & GlobalValueSetTranslation. Similar behaviour with Metadata API's listMetdata (ant).

jh480 avatar Sep 16 '22 21:09 jh480

Hi @jh480 @kalius - do you know of any "managed package with public (not protected) Custom Metadata Type record and managed Layout" that I can install into a scratch org to test this out?

WillieRuemmele avatar Oct 24 '22 15:10 WillieRuemmele

@WillieRuemmele, maybe FinServ (Group Builder Field Sets/ Job Flow Settings/ Use Standard Triggers)? https://www.salesforce.com/form/signup/financial-services-cloud-trial/

Though afaik protection is not relevant, problem relates to all managed Custom Metadata.

jh480 avatar Nov 01 '22 22:11 jh480

Unfortunately, the fromOrg feature is getting its information from the same place (metadataApi#list)

https://github.com/forcedotcom/source-deploy-retrieve/blob/b1d5ec90e358e65cb454358f0bb785cec42bce9a/src/resolve/connectionResolver.ts#L96

I'm going to mark this as "owned by another team". You should open a Case to help get attention, and preferably limit the repro to the metadata api list command so that's it's clearly an API problem and the CLI doing something.

mshanemc avatar Nov 02 '22 20:11 mshanemc

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

github-actions[bot] avatar Nov 02 '22 20:11 github-actions[bot]

@WillieRuemmele, yes I have one public package with all available stuff for testing. I can share the link if you want to look at it.

yeah, probably it is really api problem..

kalius avatar Nov 03 '22 11:11 kalius

Apparently, this is "working as designed". Here's an idea about it: https://ideas.salesforce.com/s/idea/a0B8W00000NX7GOUA1/list-managed-metadata-for-layout-quickaction-etc-with-correct-namespace-prefix

jh480 avatar Feb 03 '23 16:02 jh480

W-15587165

mshanemc avatar Apr 30 '24 19:04 mshanemc