0

I was trying to get layout change from the remote so I can push to repository by specifying layout name using sfdx force:source:retrive -m Layout:mylayout but I don't understand why when next time I make some code change and push my change to scratch org it will try to upload so many files? when calling retrieve with specific layout does it get more than I need?

@ my scratch org environment in visual studio code I run the following commands

  1. sfdx force:source:status -r //find changes in remote in this case I just want to get the metadata for a particular layout
  2. sfdx force:source:retrieve -m Layout:"Changed object layout"

After this I tried to make some changes in a single apex class then It tries to upload all files "Source PROGRESS | ----- 2500/2500 Files" I am not sure if this is actually uploading but it takes for ever to upload new change for apex class to scratch org

1
  • No, it doesn't. It sounds like something else is going on here. Unfortunately, we don't have enough details to help you. Please be as detailed as possible as what exactly happened, which commands you ran, with parameters, in specific order. Also, are the orgs Scratch Orgs, Sandboxes, other? You can edit your post to include more information.
    – sfdcfox
    Jun 21, 2020 at 2:25

1 Answer 1

0

To retrieve a single layout you should specify the Layout metadata name and the object name followed by the layout's name, like this:

Layout:Object-LayoutName

For example:

Layout:Account-MyCustomAccountLayout

If you do not specify the object or the layout name, it won't retrieve anything.


Regarding the push 2500 files thing: this is the behavior of "push and override conflicts" mode. That is, using the sfdx force:source:push with the --force parameter. Try the command without this parameter, if you are using it.

1
  • I had this map to shortcut and totally forgot about it. Thanks Jun 21, 2020 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .