The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

This one works for me very well for me https://www.npmjs.com/package/sfdx-ext


1

I'm not sure if the documentation exists else-where, but the default readme (created after running sfdx plugins:generate contains the following: Debugging your plugin We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the .vscode directory of this plugin is a launch.json config file, which allows you to attach ...


0

i made the changes for solution number 1 which worked fine however for Part 2) i am getting this error...can anyone advise please?


0

I was able to extract all records using the soql:query command instead and output to csv. E.g. sfdx force:data:soql:query -q "QUERY" -r csv > data/filename.csv


1

Part 1 Remove sfdx force:org:list from the JSON file. It should start with { and end with }. Part 2 Type in sfdx commands into the Terminal. You can open the Terminal with Ctrl+Shift+~. It appears in the bottom right side of the window. You can see it in your first screenshot where it currently says PROBLEMS (1). You can also click TERMINAL to start a new ...


1

The Data Protection and Privacy preference can be automatically enabled via the scratch org definition file (e.g. project-scratch-def.json) using the settings.orgPreferenceSettings.consentManagementEnabled property. { ... "settings: { "orgPreferenceSettings": { "consentManagementEnabled": true } }, ... } However, ...


0

You probably have app.js-meta.xml on the root folder (force-app/main/default/lwc), while it should be on the app folder (force-app/main/default/lwc/app)


0

You need to set the org with defaultusername, not defaultdevhubusername (the latter is used for creating packages and scratch orgs, the former is for SOQL, retrieve, deploy, etc). To set the value, press Ctrl+Shift+p, then choose "SFDX: Set a Default Org" (you can type in "default org" to quickly find the command), then select your trailhead username. This ...


4

Your API version is set to 45.0 (and/or your Dev Hub may not be on Winter '20 yet). On that API version, the networksEnabled setting lives in orgPreferenceSettings, e.g., "features": [ "Communities" ], "settings": { "orgPreferenceSettings": { "networksEnabled": true } }


1

Create package.xml; can be done programatically using Metadata API. For one time generation: packagebuilder.herokuapp.com sfdx force:mdapi:retrieve --retrievetargetdir . -u yourusername@whatever -k package.xml


3

I ran into this situation few days ago, so I created a bash script, which will first query all email folders and then creates package.xml and retrieves all EmailTemplates using that package.xml. This is assuming you are on a unix box and jq is installed. 1) Prepare a file named DownloadAllEmailTemplates.sh with below content: rm -f temp.txt rm -f ...


3

The EmailTemplate metadata type does not support wildcard retrieval[0] - in package.xml or using the CLI. You need to specify each individual EmailTemplate you want to retrieve. E.g. sfdx force:source:retrieve -m EmailTemplate won't work, but sfdx force:source:retrieve -m EmailTemplate:folder/MyEmailTemplate should . [0] https://developer.salesforce.com/...


2

SocialCustomerService is added in version 47 (Winter '20) You need to specify in your configuration to use the preview version for your scratch org. You can select the Salesforce version by adding release to your org configuration { "orgName": "Dreamhouse", "edition": "Developer", "release": "Preview", "settings": { "orgPreferenceSettings":...


2

$ is a reserved character in some terminals, so I had to escape $ like this --folder="unfiled\$public" Here is the complete command that is working: ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled\$public NOTE: I ran into this issue on macOS. Here is the bash script I created to prepare pacakge.xml ...


2

You can use Id as the field to upsert against. There's even an example in the docs: $ sfdx force:data:bulk:upsert -s MyObject__c -f ./path/to/file.csv -i Id -w 2 For new records, leave the Id column empty. Here's an example file I used that worked in my developer org (YMMV): Id,Name ,Acme This created a new account called Acme. Make sure you modify the -...


0

It's better to give a default value to objectApiName attribute when you are using the component outside the record context. As property is annonated with @api, it will get automatically changed. You need to know these points:- If a component is used on a Lightning record page, you can pass the component the API name of the current object. In the component’...


1

You can use any of the types in the Metadata Types documentation. There is mostly a 1:1 relationship to those metadata types for the force:source:retrieve command. Settings are kind of an exception (e.g. Address Settings would be retrieved using Settings:Address), but I think that's the only one. Edit: Updated Link. The types are located in the left nav ...


1

Looks like a simple case of not setting up your meta.xml file content correctly. See the documentation for details. You need isExposed to be true and you'll want to set up some targets/targetConfigs as needed.


0

The problem was related to symbolic links and is fixed in SFDX v46.15.3: FIX: On macOS, the temporary zip file created when running force:source:push, force:source:deploy, or force:mdapi:deploy once again contains files that are symbolically linked.


1

--json will output what you return in your run method. If you want to display something without the --json, you can use this.ux.log('Hello World!'). This output will not be visible using --json though, which is likely what you want, as in this case everything should be in your returned json object. In case you would like to see something all the time, you ...


1

You can certainly keep the code on your private git repo and have you users install using below commands git clone <https/ ssh link of repo> Then users will need to cd into the directory of the project cd <PluginFolderRoot> After that they can execute the below command sfdx plugins:link <pluginname> The other alternative approach is to ...


1

As source:retrieve is available now, it is better to use this latest retrieve method (mdapi had some bugs) sfdx force:source:retrieve -n "Package1, PackageName With Spaces, Package3"


1

Escaping the comma would have been my first approach - however if you execute the sfdx command in a shell, then the shell will also interpret characters in arguments. You could try to "double-escape", e.g. write ... "package\\, name". The shell would interpret \\ as an escaped backslash sign and pass one backslash sign towards the sfdx command.


3

sfdx force:package:list requires a dev hub. If you want to list packages in another type of org what you want is sfdx force:package:installed:list.


2

Sandboxes cannot be Dev Hubs or own packages. To enable Dev Hub, you must be in your Developer Edition, trial, or production org (if you’re a customer), or your business org (if you’re an ISV). Sandboxes' refresh cycles are not compatible with being the owner of a package and its associated version artifacts, which are expected to have an arbitrarily ...


0

This issue has been fixed by Salesforce on version 46.15.3 (September 19, 2019). To install latest version, you should execute the following command: sfdx plugins:install salesforcedx@latest Release notes: "FIX: On macOS, the temporary zip file created when running force:source:push, force:source:deploy, or force:mdapi:deploy once again contains files ...


3

If the large items are not intertwined components but opaque data such as static resources, then I suggest you replace those in your main Git repository with small place keepers e.g. replace the content of a 4M byte static resource with 4 bytes of content. You can then push that content in one go. Then have the real static resources in a second Git ...


Top 50 recent answers are included