5

I retrieved a Named credential using Ant migration tool and in the xml it looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<NamedCredential xmlns="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 gives error for password. Due to this i have to go and manually create a named credential as a pre-deployment activity. Can password be also set in this xml and deployed using Ant ?

13

adding password manually after retrieve and before deploy worked :

<?xml version="1.0" encoding="UTF-8"?>
<NamedCredential xmlns="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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.