• #25920
     kapil #45

    How to create custom objects/setting using Apache Ant in Salesforce?

    How to create custom objects/setting using Apache Ant in Salesforce?

    Tagged: , , , , ,

     Ratnakar #30

    Hi Kapil,

    we cannot create objects using Apache ant but we can migrate objects from one salesforce org to another
    Following are the steps to migrate objects from one org to another:
    1.In the build.properties specify the username and password of the source and destination org.
    2.In the package.xml specify the name of object you want to retrieve.
    3.your build.properties look like this
    # build.properties

    # Specify the login credentials for the desired Salesforce organization

    #sf.sessionId = <Insert your Salesforce session id here. Use this or username/password above. Cannot use both>
    #sf.pkgName = <Insert comma separated package names to be retrieved>
    #sf.zipFile = <Insert path of the zipfile to be retrieved>
    #sf.metadataType = <Insert metadata type name for which listMetadata or bulkRetrieve operations are to be performed>

    # Use ‘https://login.salesforce.com’ for production or developer edition (the default if not specified).
    # Use ‘https://test.salesforce.com for sandbox.
    sf.serverurl = https://login.salesforce.com
    sf1.serverurl = https://login.salesforce.com

    sf.maxPoll = 120
    sf1.maxPoll = 120
    # If your network requires an HTTP proxy, see http://ant.apache.org/manual/proxy.html for configuration.

    4.your package.xml look like this

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <Package xmlns=”http://soap.sforce.com/2006/04/metadata”>
    <members>specify the name of custom object</members>
    5.command to retrieve object
    ant retrieveUnpackaged

    6.command to deploy object
    ant deployUnpackaged

Viewing 2 posts - 1 through 2 (of 2 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?