6

I have tried to deploy business processes with ant. I seem to have the syntax wrong. I am seeing Entity type: 'businessProcesses' is unknown

<?xml version="1.0" encoding="UTF-8"?>
<Package xmls="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>Lead.Process1 </members>
    <name>businessProcesses</name>
  </types>
  <version>32.0</version>
</Package>
5

There are two ways:

The entire object

According to the documentation business processes are deployed as part of the custom object metadata file (.object), so you get it if you include the object in the package xml

The package.xml:

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

Just the BusinessProcess

In the package.xml specify the BusinessProcess element:

<types>
    <members>Lead.Test Process</members>
    <name>BusinessProcess</name>
</types>

You can use the Workbench tool to find out the value to put in the XML. In workbench, select Metadata Types & Components. Then select Business Processes. Then select the Object (e.g., Lead). Then find the fullName value. Lead Business Process in Workbench

Snippet of the auto-generated object XML:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
....
    <businessProcesses>
        <fullName>Test Process</fullName>
        <description>Lead Process for hardware division</description>
        <isActive>true</isActive>
        <values>
            <fullName>Closed - Converted</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>CustomLeadStep1</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>CustomLeadStep2</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Open - Not Contacted</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Working - Contacted</fullName>
            <default>true</default>
        </values>
    </businessProcesses>
....
</CustomObject>
2
  • I actually did try that but ant throws an error like Lead. HardwareLeadProcess was not found in the package.xml – Thomas Riddler Feb 11 '15 at 2:58
  • OK. It should've worked with just the Object specified. I updated the answer to show how you can include just the Business process. – Peter Knolle Feb 11 '15 at 11:12

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.