An extensible tool to generate object-model/ERD diagrams from salesforce metadata.
This tool was created to generate object-model/ERD Diagrams for custom objects in salesforce. There was a requirement for external diagrams that could not be filled by the internal salesforce schema builder or any other tool that I could find.
As a result, I built an extensible, lightweight tool to generate and organize object diagrams by functional area. The tool has multiple possible configurations and additional functionality can be built on top of the existing framework with ease.
- Multiple processor configurations for different use cases.
- Shows relationships between objects.
- Can Provide draggable charts in html format.
- Can Provide draggable charts split by functional area in html format.
- Can provide a list of custom objects and fields in CSV format.
The ant run command will build a config.properties file before running the utility. This file will contain the processors used by the utility to configure / retrieve / output the chart data. All configuration options are editable in objectmodelutil / build.xml.
Used to pull functional area information from an xml file in order to organise the chart objects by area. (See objectmodelutil / demo / testareas.xml)
Note: a blank input processor can also be used if you do not want to organise your charting output. Use:
<entry key="input" operation="del" />
in the ant
<propertyfile></propertyfile> to achieve this.
Used to pull object definitions from a local src folder.
Used to pull object definitions from a salesforce org.
Creates a CSV file of objects / fields. (No input processor needed).
Creates a HTML file of objects with supporting resources (No input processor needed).
Creates a HTML file of objects with supporting resources (InputProcessorXmlFile needed).
Build & Run
To build the utility, check out the master branch, navigate to the objectmodelutil folder and from your console, type ant (this assumes you have ant installed).
To run the utility, type ant run after building. The default run command in build.xml points at the objectmodelutil / demo folder and performs a local retrieve of metadata, arranging the output into functional areas specified in objectmodelutil / demo / testareas.xml.
Reporting Issues & Enhancements
Please report any issues using the github issues feature. Suggestions / bug reports are welcome as are extensions containing additional functionality.
Known Salesforce Issue : There are certain elements in a salesforce object xml definition that cannot be loaded by the Salesforce Java API Object. These need to be removed as and when they are found (Contributions Welcome!):
(Example at: objectmodelutil / src / main / java / com / financialforce / objectmodelutil / model / processor / retrieve / RetrieveProcessorLocal.java (lines 109, 110))
objectAsString = objectAsString.replace("UTF-8", "UTF_8"); objectAsString = objectAsString.replace("<restrictedPicklist>true</restrictedPicklist>", "");
Copyright (c) 2014, FinancialForce.com, inc All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the FinancialForce.com, inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jsPlumb is distributed under the GPLv2 and MIT Licenses: jsPlumb
jQuery is distributed under the MIT License: jQuery