I had a scenario like when migrating a named credential with password in salesforce production. I resolved that issue so I came here to give a solution for Password error problem.
1. Retrieve a Named credential from Ant Migration tool
2. XML will Look like this,
<?xml version="1.0" encoding="UTF-8"?>
<NamedCredential xmln="http://soap.sforce.com/2006/04/metadata">
<endpoint>https://prodbox-dev.herokuapp.com/v1</endpoint>
<label>prodbox_heroku</label>
<principalType>NamedUser</principalType>
<protocol>Password</protocol>
<username>technical.user.prod@techuser.dev</username>
</NamedCredential>
When i deploy the same using ant, it displays error for password.
So I added a password manually after retrieve.
<?xml version="1.0" encoding="UTF-8"?>
<NamedCredential xmln="http://soap.sforce.com/2006/04/metadata">
<endpoint>https://prodbox-dev.herokuapp.com/v1</endpoint>
<label>prodbox_heroku</label>
<principalType>NamedUser</principalType>
<protocol>Password</protocol>
<password>actual Password</password>
<username>technical.user.prod@techuser.dev</username>
</NamedCredential>
Hi
ReplyDeleteCan you tell me how to retrieve the named credential & deploy it ot another environment?
My objective is to have an xml as above and to deploy to environment. I dont know how to name the the xml . I did sample deployment of class and other but not this.
Can you please help on this.
Thanks
Pandi G S