+ Start a Discussion
Mike_MMike_M 

how to produce report of all metadata

We are in the process of merging 2 salesforce orgs. It would be really helpful if there was a printable report that showed all standard objects as well as all customizations to SalesForce. (I'm not interested in the user-data, just the meta-data) Do any such reporting tools exist?

 

Thanks for any links or suggestions. 

 

Mike

CharlyGCharlyG

There is an app called DreamTeam Snapshot - allowing admins to manage releases with SnapShot and move data with Monarch. I used the trial and was able to get really good lists of allt he metadata in two orgs, it even did a comparison between the 2 orgs.

 

Hope this helps.

somessomes

Hi Mike,

 

if you want  a  report all about your org's metadata, you can use the saleforce.com meta-data api.

 

after login  by passing the credentials, you can retrive the org's meta data by just passing the version of the saleforce.. on this way, you can get the individual object's meta data aswell.

 

package com.example.samples; import com.sforce.soap.partner.LoginResult; import com.sforce.soap.partner.Connector; import com.sforce.soap.metadata.DescribeMetadataObject; import com.sforce.soap.metadata.DescribeMetadataResult; import com.sforce.soap.metadata.MetadataConnection; import com.sforce.soap.partner.PartnerConnection; import com.sforce.ws.ConnectionException; import com.sforce.ws.ConnectorConfig; public class ListMetadata { public static void main(String[] args) throws ConnectionException { ListMetadata md = new ListMetadata(); md.login("somes@infosys.com", "madhu12somu8mPqn8NCdsOBKEdmPl7vsXg0"); md.listMetadata(); } private MetadataConnection metadataStub; public void login(String username, String password) throws ConnectionException { ConnectorConfig cfg = new ConnectorConfig(); cfg.setProxy("10.152.80.42", 80); cfg.setProxyUsername("somes@infosys.com"); cfg.setProxyPassword("madhu12somu8mPqn8NCdsOBKEdmPl7vsXg0"); cfg.setManualLogin(true); PartnerConnection pc = Connector.newConnection(cfg); LoginResult lr = pc.login(username,password); cfg.setSessionId(lr.getSessionId()); // mdCfg.setServiceEndpoint(lr.getMetadataServerUrl()​); cfg.setServiceEndpoint("https://ap1-api.salesforce.com/services/Soap/m/24.0"); metadataStub = new MetadataConnection(cfg); } public void listMetadata() throws ConnectionException { DescribeMetadataResult d = metadataStub.describeMetadata(24.0); for (DescribeMetadataObject m : d.getMetadataObjects()) { System.out.println(m.getDirectoryName()); } } } 

 belo code describes the individual object

public void describeSObject() { try { DescribeSObjectResult describeSObjectResult = connection.describeSObject("Account"); if (describeSObjectResult != null) { Field[] fields = describeSObjectResult.getFields(); String objectName = describeSObjectResult.getName(); boolean isActivateable = describeSObjectResult.isActivateable(); if (fields != null) { for (int i = 0; i < fields.length; i++) { Field field = fields[i]; String name = field.getName(); String label = field.getLabel(); System.out.println("Name & Label :"+ name +label); PicklistEntry[] picklistValues = field.getPicklistValues(); if (picklistValues != null && picklistValues.length>0) { System.out.println("Picklist values: "); for (int j = 0; j < picklistValues.length; j++) { if (picklistValues[j].getLabel() != null) { System.out.println("\tItem: " +picklistValues[j].getLabel() ); } } } String[] referenceTos = field.getReferenceTo(); if (referenceTos != null && referenceTos.length>0) { System.out.println("Field references the following objects:"); for (int j = 0; j < referenceTos.length; j++) { System.out.println("\t" + referenceTos[j]); } } } } } } catch (Exception ce) { ce.printStackTrace(); } }

 

dev_firedev_fire

Hi Mike,

 

There is an appexchange tool "Object Metadata Snapshot Tool".


This app converts object and field configuration detail into custom object records. Once configuration are stored in table, you can use Salesforce user interface to list, report, search object configuration.

 

  • See your org object schema through your favourite salesforce interface such as list, detail, report, and so on
  • Search object name or object lable through salesforce search box
  • Download metadata as xsl or csv file via salesforce report

 


Mike_M_2Mike_M_2

somes,

 

Looks kind of complicated, I'll see If I can work my way through it. Thanks!

 

Mike_M_2Mike_M_2

dev_fire,

Do you know if the issues with " insufficient code coverage " for testing have been fixed for the "Object Metadata Snapshot Tool"?

 

Mike

dev_firedev_fire

Hi Mike,

 

Sorry for the delay in response, I was on vacation.

 

No I am not aware of the issue. I will search & get back to you :)