Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to retrieve custom fields from standard object using Ant Migration in Salesforce?

    Tagged: Ant Migration, Custom Fields, Metadata, Package XML, Standard Objects

    • Salesforce® Discussions

      How to retrieve custom fields from standard object using Ant Migration in Salesforce?

      Posted by Anurag algoworks on August 21, 2018 at 11:52 AM

      While retrieving custom fields from Standard object using Ant Migration, do we need to list all of the fields in package.xml or is there another way to do it?

      shariq replied 8 years ago 4 Members · 3 Replies
      • Ant Migration
      • Custom Fields
      • Metadata
      • Package XML
      • Standard Objects
    • 3 Replies
    • madhulika shah

      Member
      August 21, 2018 at 12:52 PM

      Hi Anurag,

      Yes, we need to list all the fields in package.xml. As per the documentation the CustomField metadata type does not support wildcards sadly. You can access Custom Fields on Standard Objects by using the CustomObject metadata type as described hereagainst specific Standard Objects. Then parse the .object file to build your destructiveChanges.xml file. Finally you can also use the sf:listMetadata task to download a list of all custom fields and then filter locally for Standard objects.

      <sf:listMetadata
      username="${sf.username}"
      password="${sf.password}"
      metadataType="CustomField"/>

       

    • [adinserter block='9']
    • Parul

      Member
      September 21, 2018 at 1:52 PM

      Hi

      The Documentation the custom field metadata type does not support wildcards and you can access field on Object by using metadata type on standard type object. Finally, you can use sf:listmetadata task to download the list of all custom fields.

       

      Thanks.

    • shariq

      Member
      September 22, 2018 at 2:53 AM

      Hi,

      Try this in your xml file -

      <types>
      <members>Account.PayeeNameOverride1__c</members>
      <members>Account.PayeeNameOverride2__c</members>
      <members>Contact.JobDescriptionDate__c</members>
      <members>Contact.JobDescription__c</members>
      <name>CustomField</name>
      </types>

      Hope this helps.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Apex Test Class

    All You Need to Know About Apex Test Class in Salesforce

    Blog in Salesforce Apex

    You may create and run tests for your apex classes and triggers on the lightning platform using the apex testing framework.  Apex unit tests help…

    Apex Tests, Apex Triggers, Apex Unit Tests, Class Level, Code Coverage Criteria
    ashutosh pandey Jan 3, 2023
    3,144  Views
    Document Generation in Salesforce with Nintex DocGen via Apex Code

    Document Generation in Salesforce with Nintex DocGen via Apex Code

    Blog in Salesforce Implementation

    Hello All, Welcome to another part of Nintex Document Generation in salesforce and this gonna be code-based. Before going to dive into it, I request…

    Document Generation, Document generation in salesforce, Drawloop, Nintex with apex, Nintex with API
    Ankit Mar 23, 2018
    13,496  Views

    Success Stories – How DemandBlue Helped Its Clients Improve Revenue Recognition with Salesforce Revenue Cloud Implementation

    Blog in Salesforce Implementation

    Businesses that deal with subscription-based contracts, usage-based billing or other complex contracts face several difficulties in managing their billing cycle. Though Salesforce CPQ implementation does the heavy-lifting…

    Automating Price Quotes, B2B Commerce, billing, Billing Cycle, Billing Operations
    LevelShift (formerly DemandBlue) Feb 16, 2022
    2,673  Views

    Popular Salesforce Videos

    Salesforce Live Executive Experience: UK and Ireland 2021

    Salesforce Live Executive Experience: UK and Ireland 2021

    Video in Salesforce Stories

    At Salesforce Live Executive Experience we welcomed guests in-person and virtually to enjoy enlightening content, much missed networking and a performance from Jools Holland. The…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Salesforce LIVE
    Pooja Jul 28, 2021
    1,809  Views
    How to Create a Salesforce Object Calendar

    How to Create a Salesforce Object Calendar

    Video in Others

    In this video, we show you how to create a calendar view for any object in Salesforce. This is a feature that can easily help…

    Salesforce Implementation, salesforce, Salesforce Org, salesforce consultants, Salesforce VIdeos
    Roycon Jan 17, 2022
    2,536  Views
    Flow to Redirect User to Newly Created Record - Salesforce Flow

    Flow to Redirect User to Newly Created Record - Salesforce Flow

    Video in Salesforce Admin

    Scenario: Shubham is looking for functionality in Salesforce Flow Where after creating a record it redirects to that particular record detail page. Solution A: Create…

    Salesforce Training, Salesforce Lightning, Salesforce Flow, Salesforce Video, Salesforce Learning
    Shubham Jan 21, 2021
    10,690  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.