Pages

Monday, April 25, 2016

Salesforce: Retrieving Metadata with Developer Workbench

Use Case: as time goes by, we have more and more Process Builder calling Auto Launched Flow, we found an Auto Launched Flow and not sure is called by Process Builder.

Solution:
Use Force.com IDE or MavensMate to download the metadata file, but if your machine is not installed with any IDE, you can use Developer Workbench to download the metadata XML file -- huge thanks to Doug Ayers for the tips.

1. Prepare the Package 

A. Using Package XML file
Save the file as package.xml or any other name
 <?xml version="1.0" encoding="UTF-8"?>  
 <Package xmlns="http://soap.sforce.com/2006/04/metadata">  
   <types>  
     <members>*</members>  
     <name>Flow</name>  
   </types>  
   <types>  
     <members>*</members>  
     <name>FlowDefinition</name>  
   </types>  
   <version>36.0</version>  
 </Package>  
** to get the name tag, you can use this free tool Package Builder

B. Create Package
Instead of creating XML file as above, the other option is by creating Package from Salesforce menu Setup | Create | Packages, see this blog for complete reference Getting Unstuck.


2. Developer Workbench
- Click Migration | Retrieve
- Select the XML file created for "Unpackaged Manifest"
- or enter the Package Name, if you use option B - Create Package
- Check "Single Package"

- Click Next button
- Click Retrieve button

- Click "Download ZIP File" link when done


3. Extract and Find
A zip file will be download, you need to extract it and using tool like Notepad++ to find the metadata you need. In my use case as above, I am looking for <actionType>flow</actionType> to find all Flow called by Process Builder.



Reference:

No comments:

Post a Comment

Page-level ad