web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Retrieve all tables from solution

(0) ShareShare
ReportReport
Posted on by 92

Hello,

I want to create a web API call to retrieve all tables from a solution by the solution's unique name. For example, I tried using https://[organization url].crm4.dynamics.com/api/data/v9.2/solutions?$filter=(endswith(uniquename, 'Solution Name')), but I cannot retrieve the tables from the solution. I got the table's unique identifier, but I want to get the table's logical name. Can someone help me with my quest? 

Thank you!

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    I don't know if you can do in a single query, but first one will be to retrieve the solution components (type entity) with the filter or the guid of the solution, for example:

    /api/data/v9.2/solutioncomponents?$select=componenttype,objectid&$filter=(_solutionid_value eq cd1014b3-34e5-454f-96b1-d2a23855d5ea and componenttype eq 1)

    in this way inside the column objectid you get the IDs of the tables involved.

    At this point you can query or the metadata or the Entity table. With the Entity table will be something like:

    /api/data/v9.2/entities?$select=entityid,logicalname&$filter=Microsoft.Dynamics.CRM.In(PropertyName='entityid',PropertyValues=['409c8fb7-cd2e-4b10-b18d-1a52509e778d','cdacaa99-750e-47b8-ba95-13855ff0360f'])

    a note here: I am doing a IN operator to a primary key, is something that works but I can't guarantee 100%, the alternative is to create a OR condition with all the values, something like

    /api/data/v9.2/entities?$select=entityid,logicalname&$filter=(entityid eq 409c8fb7-cd2e-4b10-b18d-1a52509e778d or entityid eq cdacaa99-750e-47b8-ba95-13855ff0360f)

    Because is a GET request if you your values create a string way too long you need to batch the request to be a POST.

    Another safe approach is to retrieve all the entities first, cache the values and after map with the objectid values you get from the solution components. (really depends on what you are doing here)

    hope it helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans