Thursday, December 29, 2016

Salesforce Metadata Extract to CSV/XLS and Analysis - How tos

Salesforce Metadata Extract to CSV/XLS and Analysis - How tos

There are different ways you can extract Salesforce metadata and analyze the information. Following are some of the ways you can extract the Salesforce Metadata and analyze it.

Use cases where you will need to analyze Salesforce metadata:
  • For change management of your existing Salesforce org customizations
  • Evaluating the impact of a change Vs current state of salesforce metadata.
  • While merging two salesforce org or migrating from one salesforce org to another salesforce org.
  • Integrating with another salesforce org
  • Salesforce org health check-up
  • Re-engineering the Salesforce Org etc

Following are few of the ways you can extract the Salesforce metadata  for analysis:
  • Using eclipse extract metadata in XML format and convert XML to CSV
  • Sublime plugin-Haoide
Extract Salesforce metadata: using eclipse and XML to CSV converter:
  •  If you are wondering how I can read the salesforce metadata in an excel spreadsheet then here are the steps you can follow: 
    • 1) Get the Metadata file using Eclipse (using force.com plugin) 
    • 2) Use the website "http://www.luxonsoftware.com/converter/xmltoexcel" to convert "XML file" to "Excel Spreadsheet" (for Free) or any other tool that converts Nested XML to Excel http://xmlgrid.net/xml2text.html 
    • 3) How you can do that using the web-site "http://www.luxonsoftware.com/converter/xmltoexcel": 
      • a) Upload the XML file in the above website and click the convert button 
      • b) Download the result and it downloads in excel format with sub-tabs for each nested loops Example: If you wanted to view fields in page-layout. 
      • 1) Get the page-layout XML file using Eclipse (using force.com plugin) 
      • 2) Upload the page-layout(In XML format) to the web-site (http://www.luxonsoftware.com/converter/xmltoexcel) and convert to "Excel Spreadsheet"
                  OR 
    • 4) How you can do that using the web-site "http://xmlgrid.net/xml2text.html": 
      • a) Upload the xml file in Source Data section. 
      • b) After loading the source data "Convert" button will appear. Click on "Convert Button". (Select a given node before clicking on convert button) 
      • c) The output will be displayed in output section. You can expand the nested nodes and copy manually the entire section and paste it to a excel spreadsheet. or click "Save" button to save it in CSV format.
 Extract Salesforce metadata using - sublime plugin HAOIDE

  1. Download and Install Sublime Text 3
  2. Install Package Control
    • Package Control is used to easily create and setup packages in Sublime, in other words, it makes it so you can easily install apps v. having to enter code in the console every time.
  3. From the Package Control Install page, copy the text in the Sublime Text 3 box.
  4. In Sublime, go to View – Show Console
  5. Paste the text copied from the Package Control site into the Console and press enter.
  6. After Package Control is installed, a message box will popup, press ok.

Install the Haoide Package

  1. Re-open Sublime and go to Tools – Command Palette…
  2. Select ‘Package Control: Install Package’, you can do so by starting to type install in the Command Palette.Install Haoide
  3. A list of packages to install will appear in the Command Palette, type ‘Haoide’ and select it.
  4. Exit Sublime and re-open.
  5. 012016_2346_8.png
  6. Before you can create a project, you need to setup your workspace. Navigate to: Haoide | Settings | Settings – User
  7. Enter the following test, with your information replacing the pink & save.  You can find a copy of my Default Settings and User Settings here.
    "workspace" : "C:/WHERE/YOU/WANT/TO/SAVE",
    "projects" : { "YOUR_PROJECT_NAME_PROD":
         {
              "allowed_packages":
                     [
                     ],
              "default": false,
              "login_url": "https://login.salesforce.com",
              "password": "YOUR PASSWORD HERE",
              "security_token": "YOUR SECURITY TOKEN HERE",
              "subscribed_metadata_objects":
                   [
                   ],
              "username": "YOUR USERNAME HERE"
         }
    }
    
    
  8. Retrieve SObject and workflows usign HAOIDE.
    
    
     
  9. Click on export to export any of the following metadata to CSV.



No comments:

Post a Comment