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, 1 month 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

    How Integrating Salesforce with Accounting Tools Helps Businesses to Change the Operational Paradigm

    Blog in Salesforce

    In a world where work from home has become the new normal, businesses quickly need to adapt to the changing market scenario. Companies must take…

    Automated Budget Planning, Automated Workflow, Bad data, Big Data, Business Information Management
    Softweb Sep 8, 2020
    2,635  Views

    Top Salesforce Winter '22 Nonprofit Release Features

    Blog in Salesforce, Salesforce Releases

    Nonprofits have unique requirements, and Salesforce is familiar with them. There's nothing your Nonprofit can't accomplish with its effective resources. With one-of-a-kind Salesforce solutions, they…

    Application Evaluation, Automation Studio, Best-performing Giving Pages, Campaign, Contact Data
    Apphienz Sep 24, 2021
    2,335  Views
    company in salesforce

    How To Set Up Your Company in Salesforce

    Blog in Salesforce

    Use the corporate Information page in Setup to trace what’s important about your company’s organization in Salesforce. you'll also manage your licenses and entitlements. This…

    App-and-profile Combinations, Business Needs, Company Information, Data Security, Einstein Features
    krati vishnoi Jul 23, 2020
    5,577  Views

    Popular Salesforce Videos

    Introduction To Salesforce Apex | DataType | Collection | Conditional Statements

    Introduction To Salesforce Apex | DataType | Collection | Conditional Statements

    Video in Salesforce Apex

    In this video salesforce apex hours creators provides an introduction to Apex. Apex enables developers to access the Salesforce platform, back-end database and client-server interfaces…

    salesforce, salesforce platform, Apex, Salesforce Developers, Salesforce Video
    Mayra Aug 11, 2022
    2,317  Views
    Types of Generative AI Models | How Does Generative AI Work?

    Types of Generative AI Models | How Does Generative AI Work?

    Video in Others

    Have you ever wondered how AI can be so creative? How do they generate art, music, and even text all on their own? Look no…

    salesforce, Salesforce Community, Salesforce Webinar, Webinar, Live Webinar
    Cyntexa Sep 5, 2025
    389  Views
    How to Create a File Location in Salesforce Marketing Cloud

    How to Create a File Location in Salesforce Marketing Cloud

    Video in Marketing, Salesforce Training

    Cameron Robert shows how to use PuttyGen to generate and create an SSH Key for SFTP usage in Salesforce Marketing Cloud, then how to create…

    Salesforce Training, Salesforce Tutorial, Salesforce Marketing Cloud, Trailhead, Salesforce Video
    Cameron Sep 16, 2021
    2,926  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.