Skip to main content

I'm trying to use sfdx:force:source:convert to convert page layouts from source format to metadata format, and realise there seems to be some bug with the command.

 

Repro:

  1. Specify few page layouts from both standard object and custom object in my manifest (package.xml)
  2. Run sfdx:force:source:convert, specifying my output directory and path to manifest
  3. Check the outcome in the output directory

As shown in my attached screenshot, my package.xml (Labeled 1) consists of 2 page layouts from custom objects and 2 page layouts from standard object (Case & Contact)

 

In my original source folder (Labeled 2), I have many other page layouts from those objects

 

In my output directory (Labeled 3), all the custom objects' page layouts got converted even though they are not specified in the package.xml, but for standard objects' page layouts, only those specified in package.xml get converted.

 

Is this a bug from the sfdx command, or is it an expected behaviour?

Appreciate if anyone who knows about this can help. Thank you.

 

#Sfdx Command #SFDX CLI #Page Layout

 

Problem using force:source:convert on custom object's page layout

6 Antworten
  1. 15. Juli 2021, 10:42

    Hi @Yean Chiat Wong

     

    I had exactly the same issue with the layouts. From time to time, similar bugs appear, that the CLI team fixes, then bugs appear again, the team fixes them, and so on.

    Very similar to what you have now:

    https://github.com/forcedotcom/cli/issues/156

     

    Fortunately, there is a tool that can help. This is SFDX Essentials:

    https://www.npmjs.com/package/sfdx-essentials

    https://github.com/nvuillam/sfdx-essentials

     

    After sfdx:source:convert you can use sfdx-essentials:

    sfdx essentials:metadata:filter-from-packagexml -i path/to/convertedMd -p path/to/package.xml

     

    Mark the answer is the best one if it helps.

0/9000