Skip to main content
小组

Salesforce CLI New Command Feedback

Please provide us with feedback on new CLI commands as we roll them out

Hello,

I try to retrieve with command sfdx force:source:retrieve. It works well with sfdx-project.json :

 

...

{

"path": "P000534-242-app",

"default": true

},

...

But it does not work with json file :

 

{

"path": "P000534-242",

"default": true

},

...

 

In both case folder exists.

regards,

Jean-Marc

0/9000

When using force:mdapi:deploy or any **:deploy really and specifying tests to run, is there no way to specify testSuites? It seems you are only allowed to specify Apex test classes when using the option RunSpecifiedTests. This is very restricting and frustraighting because we maintain all test classes in Suites and could write a simple deploy command to run them if we could specify that. Currently we have to modify the deploy script with a huge list of test classes every time we create or remove a test class.

1 条评论
  1. 2019年5月26日 15:22
    Sounds like a reasonable enhancement. We run all local tests for mdapi deployments (--testlevel=RunLocalTests) to integration and UAT sandboxes and no tests at for single files source deployments (saves/compiles) to developer sandboxes so have not hit this but I don't think it would hurt to add it.
0/9000

Hi All,

 

    sfdx:source:deploy is a super useful. But One thing I feel missing here is to validate the component instead of actually deploying my component.

 

Regards

Anup Prakash

4 条评论
0/9000

I believe I am having an issue with the source:retrieve command.

 

I have a sfdx-project.json file like the following:

 

{

  "packageDirectories": [

    {

      "path": "force-app",

      "default": true

    },

    {

      "path": "myApp",

      "default": false

    }

  ],

  "namespace": "",

  "sfdcLoginUrl": "https://test.salesforce.com",

  "sourceApiVersion": "45.0"

}

 

For this scenario lets say I am interested in retrieving a class that is currently in /myApp/main/default/classes/ called MyApexClass.cls.

 

I get what I expect when I use the command like either of the following:

  • sfdx force:source:retrieve -x manifest/package.xml
  • sfdx force:source:retrieve -m ApexClass:MyApexClass

The MyApexClass.cls file which is originally located in /myApp/main/default/classes/ is updated in that location.

 

However I get a different behavior when I use the command like the following:

  • sfdx force:source:retrieve -p ./myApp/main/default/classes/MyApexClass.cls

The MyApexClass.cls file is retrieved, but instead of updating the copy in /myApp/main/default/classes/, a copy of the class is put into /force-app/main/default/classes/.

 

I expect all three ways of running source:retrieve to behave similarly. I expect the file to be placed into the location it was originally.

2 条评论
0/9000

Anyone else having issues with the brand new command sfdx force:mdapi:listmetadata ??

 

I can retrieve CustomObject metadata type, but when I try to retrieve the list of Layout I get an undefined value.

4 条评论
  1. 2019年3月26日 17:35
    Excuse my ignorance, but is there any place to follow up the progress of the ticket? Or do you know @Karen Fidelak

    when this be fixed?

    Hopefully next patch on the 28 but maybe is too soon.

    Thanks!

0/9000

force:source:retrieve doesn't seem to pull all metadata types when specifying metadata components with the -m | metadata param. Many types don't seem to work but most noticeable is reports and dashboards.

 

To reproduce:

sfdx force:source:retrieve -m Report

 

No errors are shown, but no reports are pulled form the org even though there are hundreds, many of which are public.

1 条评论
  1. 2019年3月25日 17:52
    @Toby Compton

    , does the user that is authenticated have permissions to view the reports and dashboards?

    @Karen Fidelak, would you mind taking a look at this question?
0/9000

Hi

I'm noticing that when I run force:source:deploy -x package.xml and package.xml only contains validation rules, the entire objects that the validation rules are part of are being deployed.

 

Is this supposed to function like this?

 

When I run the retrieve with the same package.xml only the validation rules are retrieved.

2 条评论
0/9000

Hey all, 

 

Not sure if that would be useful anyhow, but I've recently been trying to convert medium-size, traditional implementation project (sandbox dev, ANT deployments between orgs) into source driven model and I failed (not the first time though...) and wanted to share some feedback:

  • sfdx force:source:retrieve is great addition because it allows to specify a single package.xml manifest file and pull the whole metadata into repository - good. Something that was possible with mdapi, but this one is better
  • what I'm able to do right now is to track source within git repository. I'm able to retrieve source from different orgs and thanks to the sfdx source format relatively easy make diff/merge (except for profiles). I'm also able to easily track those lousy admins who hotfix directly in prod and make it easier to merge them back into development branches - great!
  • currently I'm struggling to find a way to deploy directly from sfdx source. As far as I can see there are two options:
    • new sfdx force:source:deploy - idea is great, but:
      • if you do sfdx force:source:deploy against full package.xml - the same that is used for retrieval - that would be the best (I really don't bother keeping full org in the source code and make a full deploy each time), but I bet it will fail at some crazy component (full org -> 2000+ components)
      • in that case you can keep small purpose-fitted package.xml's (e.g. one for each release) - but somebody needs to managed that. And yet it still is not as predictable as mdapi. 
      • there are few flaws in sfdx force:source:deploy -> e.g. if you just specify one custom field - it deploys whole object. 
    • sfdx force:source:convert -> sfdx force:mdapi:deploy
      • but this doesn't give ability to limit the scope of deployment as whole sfdx source is converted into mdapi format
  • the approach I'd be willing to be able to achieve would be to:
    • have many dev boxes for feature development, where devs / consultants are building their stuff and commit them to GIT
    • code is integrated at repository level and pushed into SIT sandbox for system integration testing
    • UAT deployments are made also from GIT
    • hotfixes from prod are merged back into development branches as a rebase

Anyway, thanks for your efforts, we're looking forward for some new stuff. I'm available to answer questions if you have any.

 

if anyone else from partners could share their practice on how to easily embrace source driven model (without having number of people or some crazy tools like autorabbit on top of that), I'd be very thankful.

1 条评论
  1. 2019年3月25日 17:34
    @Maciej Simm

    Thank you for the feedback! We are starting work on updating source: deploy and retrieve so that you will be able to use them to deploy to production and skip the converting step. If you have time, would you mind walking me through your setup on a call? This way I can better visualize what you are doing and how we can improve our tools to make your experience better.

    If you are willing to do a 30-minute video call, please find time on my calendar using this link

    https://clairebianchi.youcanbook.me
0/9000

I pulled a sandbox using Salesforce CLI extensions for VS Code using sfdx : Retrieve Source in Manifest from Org command. Later when I right clicked on classes folder and selected SFDX: Retrieve Source from Org command, new classes created in sandbox recently does not get retrieved. Only the classes that are already present in the classes folder gets updated. Is this a known issue?

 

Command that runs:

sfdx force:source:retrieve --sourcepath d:\VS Code Workspaces\ENGAGE\uat\force-app\main\default\classes

0/9000