Tuesday, July 4, 2023

EntityDefinition - How to get list of all objects present in any SFDC org using tooling API

Salesforce provide Metadata API through which we can metadata information present in any SFDC org. Metadata API is SOAP based which involves consuming WSDL and then calling methods provided in WSDL.

Salesforce has introduced Tooling API which is REST based and can be used to get metadata information from any salesforce org. Tooling API is very easy to implement.

EntityDefinition provides information about standard and custom metadata. Before invoking any Tooling API endpoint, we need to do handshake with SFDC org. You can utilise Oauth 2.0 (username-password flow) or create "Named Credential" for SFDC org from which you want to fetch information.


Below is Apex class which contains method through which we can get all object details:

"findAllObjects" Method contains 3 parameters: 

  • selOrgNCName : Name of Named Credential created to connect to SFDC org
  • namespacePrefix : Specify namespacePrefix if you want to retrieve objects related to any installed packages. If you want to get list of objects created in SFDC org, then specify blank or NULL.
  • objName : specify search string if you want to get list of specific objects that contain that string. Pass blank or NULL if you want to retrieve all objects.


Hope this will help!!

6 comments:

  1. High-grade whey protein isolate is what gives Avvatar alpha whey protein its essential amino acid composition, which is ideal for muscle building and repair. With the help of this superior vitamin, jumpstart your fitness journey and meet your muscle-building objectives.

    ReplyDelete
  2. Nice and valuable information, I am exactly looking for this, Thanks for Sharing. If you are looking for best products at cheap price must visit amazon.com the best in town.

    ReplyDelete
  3. In the bustling cityscape ofElan Imperial
    lies a sanctuary of luxury living, where elegance meets comfort and style intertwines with functionality. Welcome to Elan Imperial, a premier residential complex that redefines modern living in Gurgaon. In this blog, we'll delve into the exquisite offerings of Elan Imperial and why it stands out as a symbol of opulence and sophistication.
    Elan Imperial isn't just a residential project; it's an epitome of luxury living. From the moment you step into its premises, you're greeted by an aura of grandeur and finesse. The architecture is a testament to meticulous craftsmanship, with contemporary designs seamlessly blending with the surrounding landscape.

    ReplyDelete
  4. Navigating the intricate legal landscape of Delhi, female lawyers play a pivotal role in advocating for justice and equality. With expertise in diverse legal fields, these formidable professionals provide comprehensive legal counsel and representation to clients, ensuring their rights are protected. Empathetic and assertive, they navigate complex cases with finesse, embodying resilience and determination in the face of challenges. From civil disputes to criminal defense, their dedication to delivering favorable outcomes underscores their commitment to serving the community. As pillars of justice, Female Lawyer In Delhi exemplify integrity, proficiency, and the unwavering pursuit of fairness.

    ReplyDelete