Skip to main content
23 votes
Accepted

How do I retrieve Lightning Web Components using Ant Migration tool or mdapi:retrieve command from SFDX?

The new Metadata API component is called LightningComponentBundle The following XML code should be added to package.xml: <types> <members>*</members> <name>...
Patlatus's user avatar
  • 17.8k
16 votes

Migrating Connected App - Ant Deployment Error

According to the ConnectedApp Metadata API documentation, each connected app must have a unique consumerKey value. One way to deploy your connected app is to remove the consumerKey from the ....
cndebelen's user avatar
  • 392
12 votes
Accepted

Run Specific Tests with Ant Deploy specified by command line or file

Was able to do this using ant's scripting capability. Now you can do ant deploy -Ddir=src -Dtests=Class1,Class2,Class3 <target name="deploy"> <script language="javascript"><![CDATA[ ...
Ralph Callaway's user avatar
11 votes
Accepted

Deploying destructive changes using SFDX with --sourcepath flag

We had the exact same issue, where we are using sourcepath for our deployments and we didn't want to use a package.xml for deployments. But using the create manifest command I managed to work around ...
Rens Verhagen's user avatar
9 votes

unable to obtain exclusive access to this record

This is because of record locking. From the Salesforce Developer site: This is something temporary and would be fixed automatically in 10-15 minutes maximum. Some common causes are: ...
Dan Jones's user avatar
  • 7,267
8 votes

Ant profile deployment - You cannot deploy to a required field Object_Name__c.Field_Name__c

"Since API version 30.0 a change set or ant deployment will fail if a field that is required in the field definition is included in a profile or permission set that is being deployed. If you ...
salesforce developer's user avatar
8 votes
Accepted

How to deploy Approval processes using ANT migration tool?

When you add fullName to a package.xml, the metadata API assumes you're trying to insert/update a package instead of deploying unpackaged metadata. You must not specify fullName when deploying ...
sfdcfox's user avatar
  • 502k
8 votes

ANT deployment of custom field fails - Error: Property 'picklist' not valid in version 39.0

I think from 37 Api ver picklists are replaced with Valuesets in metadata definitions and it causes an error when You try to deploy 'old' metadata with higher Api Version. To get rid of this error, ...
patryk's user avatar
  • 655
8 votes
Accepted

Retrieve a change set from scratch org using sfdx?

I managed to create a change set in my scratch org and put the metadata I wanted to retrieve from the scratch org. I managed to pull that change set the same way one pulls a package: sfdx force:...
Arthlete's user avatar
  • 5,039
7 votes
Accepted

ANT Force.com Migration Tool and Encrypted Password

You could do some sort of encryption that you can decrypt as an ant target task - like a base64 decode or something. The problem with that is anyone who's savvy enough to be able to look in the ...
Stephen's user avatar
  • 1,561
7 votes
Accepted

are there alternatives to Salesforce ANT

Generically speaking, yes, you can use almost any modern CI along with any modern build system and any modern code versioning system. I don't have specific instructions available for you, but assuming ...
sfdcfox's user avatar
  • 502k
7 votes

How To Retrieve LeadConvertSettings with Force.com Migration Toolkit

In package.xml file with 39 version of API. It works <types> <members>*</members> <name>LeadConvertSettings</name> </types>
Oleksandr Berehovskyi's user avatar
7 votes
Accepted

What version of ant-salesforce.jar am I using?

I have found some custom way, how you can detect your API version of ant-salesforce.jar. jar is an archive file, so it is possible to restore this file into components. Use WinRar or another archiver-...
Oleksandr Berehovskyi's user avatar
7 votes
Accepted

Get Lightning Web Component (LWC) definition on a describe

LWC was introduced in latest release - Spring '19 and it's API number is 45.0 so if you describe your metadata using 44.0 MDAPI won't be able to see those components. You need to change "-a" parameter ...
Bartosz Śliwiński's user avatar
6 votes
Accepted

How to match profile name to ant metadata profile name and vice versa?

I think I have finally found the solution. While one of the possible point-and-click way is suggested by @user3375426 to create an outbound changeset and click add Profiles there (I have added here ...
Patlatus's user avatar
  • 17.8k
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
  • 502k
6 votes
Accepted

LIMIT EXCEEDED during ANT retrieve call

Your package.xml file probably includes a large number of wildcard entries and is executing against a large, heavily customized environment. The Id of the specific metadata entry that precipitated the ...
David Reed's user avatar
  • 93.7k
6 votes
Accepted

How to mass-deactivate 700 picklist values

Set the isactive attribute to false and deploy those values back using ant.The values will be made inactive Check documentation here Example to set 2 values as inactive: <?xml version="1.0" ...
RedDevil's user avatar
  • 7,861
6 votes
Accepted

How to deploy Opportunity Stage picklist using Apache ANT Tool?

StandardValueSet doesn't support the wildcard (*) in package.xml. Remove that line and simply use: <types> <members>OpportunityStage</members> <name>StandardValueSet<...
cropredy's user avatar
  • 73.3k
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
  • 93.7k
5 votes

Deployment Error: Invalid field:** in related list:RelatedAccountContactRelationList

I know this is a old post, but encountered the error today while deploying. Since no one answered, I thought of replying to the post. The reason for this error is because the environment you ...
Debdeep Mazumder's user avatar
5 votes

Unknown user permission: ManageSandboxes

My source and target environment were on the same version so to solve similar issue I clicked "Match Production Licenses" on source and target. Please verify.
dan's user avatar
  • 355
5 votes

Standard Picklist Fields in Metadata API v39

You can still get the picklist values for standard fields using the StandardValueSet. To get the Account.Type field values, put this in your package.xml: <types> <members>AccountType&...
user254875486's user avatar
5 votes

Report Type – Ant Deployment Errors (Invalid Field Name & Duplicate Value Found)

Little late for the person who asked, but I just had to solve this issue the problem is if you don't bring the updated ReportType along with the new reports. It seems to throw this error. You can ...
Halfwarr's user avatar
  • 619
5 votes
Accepted

What is the best way to mass update the field labels of a custom object in Salesforce?

An IDE is arguably the easiest way to edit fields. Simply pull down the object, edit all the labels, then save the changes. You can do this in MavensMate, Force.com IDE, and others that support the ...
sfdcfox's user avatar
  • 502k
5 votes
Accepted

Add Custom profile name to Package.xml

As for your question: I have been searching through a way add custom profile names in to Package.xml file. You can add the names of the custom profiles the way you have mentioned in your post, i.e....
Jayant Das's user avatar
  • 30.7k
5 votes
Accepted

Can't retrieve non-customizable CustomObject named: Product

The API name for the Salesforce Product object is Product2. Put that in your package.xml and you should be able to retrieve the metadata. Note that the same is true of Pricebook (Pricebook2), but not ...
David Reed's user avatar
  • 93.7k
5 votes

Deploying GlobalValueSet and GlobalPicklist with ANT error

GlobalPicklist was introduced in 37.0 version and is available only in this version GlobalPicklist components are available in API version 37.0 only. In API version 38.0 and later, ...
Oleksandr Berehovskyi's user avatar
5 votes

Salesforce deployment using Ant and SFDX

The Ant-based Force.com Migration Tool and SFDX CLI are both clients of the Metadata API. You need one or the other, but generally not both, as both tools provide Metadata API deployment services. ...
David Reed's user avatar
  • 93.7k
5 votes
Accepted

CustomObjectTranslation invalid characters

Well, we figured it out. It turns out that the two objects in question (one of them actually a Custom Setting) had the _ character in their names. The display name, not the API name. My_Custom_Object ...
AvailableName's user avatar

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