11 votes

Cannot find the declaration of element

I was able to figure out Here is what you would do Go to VS Code: Code => Preference => Settings => (search for) Validation ==> Click on XML (from the left Nav) and Uncheck "...
Nick's user avatar
  • 7,012
9 votes
Accepted

How should my package.xml look like to retrieve EVERY object with its fields?

As per the documentation- Sample package.xml Manifest Files, it looks like you would have to specify the name of objects explicitly: Standard Objects <types> <members>Account</...
Raul's user avatar
  • 18.8k
9 votes
Accepted

SFDX development 'without ScratchOrg and Unlocked Packages' with Git

First, as I said before, don't merge directly in to master. Also, don't do crazy diffs and stuff to try and make it work this way. You're right to be concerned about automatic package.xml generation, ...
sfdcfox's user avatar
  • 491k
8 votes
Accepted

Retrieve/Deploy a custom metadata type's list view?

List view fetching for custom metadata types are bit tricky. If you retrieve a List View on a Custom Setting/Custom Metdata along with the Custom Setting/Metadata object when using Metadata API ...
Pranay Jaiswal's user avatar
8 votes
Accepted

GlobalPicklist no longer a valid MetaData type in 38.0?

Yes, GlobalPicklist has been replaced by GlobalValueSet. This is outlined in the relevant documentation and was mentioned in the release notes. Streamlined Metadata API for Picklists We bring you ...
sfdcfox's user avatar
  • 491k
8 votes

Cannot find the declaration of element

The posted answers helped me to discover what I believe to be an even better answer. Instead of disabling all XML Validation wholesale, there is a setting for Xml -> Validation -> Schema: ...
DanTheMan's user avatar
  • 171
8 votes

Cannot find the declaration of element

I ran into the same issue. The solution that worked for me was to replace http:// with https:// in the namespace declaration: <CustomLabels xmlns="https://soap.sforce.com/2006/04/metadata"...
JaredC's user avatar
  • 93
7 votes
Accepted

Metadata Type to Folder Structure

Use the describeMetadata call to learn the folder names of each of the types. A Java sample is included: public void describeMetadata() { try { double apiVersion = 21.0; // Assuming that the ...
sfdcfox's user avatar
  • 491k
7 votes
Accepted

How to retrieve custom fields with field level security using package.xml

You have to specify the profiles to retrieve the security for, as well as the object/fields. For example: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/...
sfdcfox's user avatar
  • 491k
6 votes
Accepted

Using DX Scratch Orgs to deploy code with legacy ant scripts

Is it possible just to use hub and DX cli to quickly spin up new scratch org with required configuration, create new user with password and then use it to deploy code in an old-fashioned way using ...
sfdcfox's user avatar
  • 491k
6 votes
Accepted

How to add any specific object's page layout in package.xml?

You can try with: <types> <members>Quote-Quote Layout</members> <name>Layout</name> </types> For any unpackaged object and page layout format will be <...
Reshma's user avatar
  • 4,019
6 votes
Accepted

Effective and efficient deployment

You are using old tools and processes, which are indeed quite inefficient and ineffective. The Ant-based Force.com Migration Tool can be replaced by Salesforce DX. Salesforce metadata should be stored ...
David Reed's user avatar
  • 92.8k
5 votes
Accepted

is there a pre-build solution for generating a package.xml from a git repo

there is this awesome tool on github https://github.com/amtrack/force-dev-tool You can use following command to create a changeset: $ git diff master feature/vat | force-dev-tool changeset create ...
Roman's user avatar
  • 663
5 votes
Accepted

Translation Workbench CustomObjectTranslation Metadata

Object's translations are retrieved only for object's custom metadata, which is included into package.xml For example, if package xml contains only one custom field and one page layout, then ...
kurunve's user avatar
  • 4,319
5 votes
Accepted

How to edit custom labels using MavensMate

You must add the CustomLabel type to your package.xml file: <types> <members>*</members> <name>CustomLabel</name> </types> Once that is saved, refresh ...
Adrian Larson's user avatar
  • 150k
5 votes
Accepted

Migrate startingNumber for AutoNumber field using ANT

See this note: You can’t retrieve the starting number of an auto-number field through Metadata API. To specify a Starting Number while deploying, add a startingNumber tag for your field to your ...
Ray Dehler's user avatar
  • 1,743
5 votes
Accepted

Generate the package.xml using a local project

You could use the sfdx convert commands as follows. Let's say your metadata API files are stored in a folder called mdapi. In folder mdapi, add a package.xml file with one metadata type found in ...
Shamina's user avatar
  • 4,245
4 votes

Metadata Type to Folder Structure

Of those I use most commonly: type path ApexClass /src/classes ApexComponent /src/components ApexPage /src/pages ApexTrigger /src/triggers ...
Adrian Larson's user avatar
  • 150k
4 votes
Accepted

How to retrieve translations using Metadata API?

Include your objects in that package.xml and you will be golden. Here is what your package.xml should look like: <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types&...
Sridhar's user avatar
  • 1,179
4 votes

Jenkins CI with Salesforce: how to generate package.xml which only contains changed metadata files

After learning some simple shell commands, I wrote some shell scripts to generate package.xml dynamically based on git commit and it works well! Now we can deploy codes only when they are changed! #!/...
Allen Li's user avatar
  • 860
4 votes
Accepted

Retrieve Standard Picklist Value Sets using package.xml

Got it finally. We need to use 'IPolicy' instead of 'InsurancePolicy' for Insurance Policy and 'IPC' for Insurance Policy Coverage Standard Value Sets. For the field PremiumFrequency on ...
Prakhar Saxena's user avatar
4 votes

I am getting this error: ERROR running force:source:deploy: The Flow named ListingID_Update was not found in the workspace

We found the issue. Someone had added the flows folder to the forceignore file in VS CODE thats why we were not able to deploy to any of our sandboxes. This problem is now resolved.
Alias311's user avatar
  • 399
4 votes
Accepted

Destructive changes for all apexclasses and components

You can use the listMetadata API calls to get a full list of elements, then parse it in to a destructiveChanges.xml and build your package. A simple NodeJS script can do this pretty easily, or even a ...
sfdcfox's user avatar
  • 491k
4 votes

SfdxError: An internal server error has occurred VS Code

I fixed this problem by executing the below commands sequentially. sfdx update sfdx plugins:update
Rahul Gawale's user avatar
  • 12.2k
4 votes

Metadata Retrieve missing files

Figured out the issue thanks to Not able to retrieve Settings through Metadata API I needed to specify the apiVersion in my retrieveRequest, as it was defaulting to version 12.0 when not included.
Jasper Madrone's user avatar
3 votes

No Package.XML found

you should not zip the "custom_md_loader" folder, try to get in this folder and then select all folders including package.xml and click to zip
collin's user avatar
  • 83
3 votes

How to deploy renamed the custom object tab using package.xml?

You can deploy the custom tabs through package.xml in the following way: <types> <members>API name of the Object</members> <name>CustomTab</name> </types>...
Ankita's user avatar
  • 1,478
3 votes
Accepted

Retrieving layouts from managed package in package.xml

In case if you want to retrieve layout from managed package, you need to specify package prefix as well. Below you will find 2 examples, first one is managed layout for managed object, and second one ...
kurunve's user avatar
  • 4,319
3 votes

Global Action Layout Metadata/Deploy

As mentioned before - get the list of Global Actions with: <types> <members>Global-Global Layout</members> <name>Layout</name> </types> But you can update ...
Jerry Pauly's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible