How to generate a class diagram of Apex class or trigger in salesforce in easy way. If Any tool is available please suggest me.

2 Answers 2


Long before the Force.com Tooling API came out I tried to buid a native tool in Salesforce to render UML class diagrams for Apex classes and SObjects.

enter image description here

The extraction of the class and object information is solely done in Apex. I really had to use ugly RegExp parsing of classes to get out relationships, fields and object.

This definitly runs into limits or errors if you classes are too complex. So regard this as a proof of concept and...

Feel free to check it out. It can be easily installed (but also forked and improved) on GitHub: https://github.com/rsoesemann/plantuml4force



I have used above for unmanaged package code and that generates class diagram.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .