1

Hello,

I work on a project with visual studio code (source format) and we use Bitbucket to stock metadata (metadata api format via Ant migration tool).

I added a picklist value for a specific record type for the account object.

Now, I would like to merge the Account.object file with only the value I added to the record type and deploy into Bitbucket.

Because we are few users to work on the same object, the metadata API for the account object is bigger than before.

How can I add only my value for the record type in the metadata and in which part is it in the Account.object file please?

Thanks

1 Answer 1

2

you can retrieve account object via following xml in metadata api

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <name>CustomObject</name>
    </types>
    <version>53.0</version>
</Package>

once you retrieve the data related to it you can find the account.object xml file which is already in your bitbucket repository as you have said

under account.object xml file you will see the record type tag with following sample data

<recordTypes>
    <fullName>Customer</fullName>
    <active>true</active>
    <label>Customer</label>
    <picklistValues>
        <picklist>AccountSource</picklist>
        <values>
            <fullName>Other</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Partner Referral</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Phone Inquiry</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Purchased List</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Web</fullName>
            <default>false</default>
        </values>
    </picklistValues>
</recordTypes>

For example if for accountscore picklist field if i want to add/remove some value for customer record type oly then i will do that here

Also just make sure your picklist is added under field metadata tag on account object as well like this

<fields>
    <fullName>AccountSource</fullName>
    <picklist>
        <picklistValues>
            <fullName>Web</fullName>
            <default>false</default>
        </picklistValues>
        <picklistValues>
            <fullName>Phone Inquiry</fullName>
            <default>false</default>
        </picklistValues>
        <picklistValues>
            <fullName>Partner Referral</fullName>
            <default>false</default>
        </picklistValues>
        <picklistValues>
            <fullName>Purchased List</fullName>
            <default>false</default>
        </picklistValues>
        <picklistValues>
            <fullName>Other</fullName>
            <default>false</default>
        </picklistValues>
        <sorted>false</sorted>
    </picklist>
    <trackFeedHistory>false</trackFeedHistory>
    <trackHistory>false</trackHistory>
    <type>Picklist</type>
</fields>
1
  • That is what I was wanted, thank you.
    – Oupat
    Commented Mar 24, 2022 at 9:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .