Answered by:
How to get the list of Entities in a Solution using SDK?

Question
-
Hi,
I want to get the list of entities in CRM Solutions using SDK.
i.e i had a solution with 10 entities, i want their display and logical names using sdk.
thank you.
Monday, July 20, 2015 9:14 AM
Answers
-
Hello,
You should query solutioncomponent based on provided solutionid and componenttype field that is equal to 1 which means Entity.
After that you will have to use objectid from solutioncomponent to identify exact entity.
Dynamics CRM MVP
My blog- Marked as answer by shashank02 Friday, July 24, 2015 1:53 PM
Wednesday, July 22, 2015 11:47 AMModerator -
Hi Shashank
below are the steps what you need to follow to get the entities from the solutions.
-->Fetch the all the entities which are there in the solutions by adding filter expression as solution component type as 1 to get only entities from the solution and by adding objectid as column set.
-->After getting solution component retrieve all entities meta data from the CRM.
-->Now you have solution's with the objectid and all entities metadata from the CRM so now you can filter metadata with the solution's component and save them in another object, that's it you will get only entities from the CRM with the schema names.
- Marked as answer by shashank02 Friday, July 24, 2015 1:53 PM
Wednesday, July 22, 2015 7:23 PM
All replies
-
Hello,
You should query solutioncomponent based on provided solutionid and componenttype field that is equal to 1 which means Entity.
After that you will have to use objectid from solutioncomponent to identify exact entity.
Dynamics CRM MVP
My blog- Marked as answer by shashank02 Friday, July 24, 2015 1:53 PM
Wednesday, July 22, 2015 11:47 AMModerator -
Hi Shashank
below are the steps what you need to follow to get the entities from the solutions.
-->Fetch the all the entities which are there in the solutions by adding filter expression as solution component type as 1 to get only entities from the solution and by adding objectid as column set.
-->After getting solution component retrieve all entities meta data from the CRM.
-->Now you have solution's with the objectid and all entities metadata from the CRM so now you can filter metadata with the solution's component and save them in another object, that's it you will get only entities from the CRM with the schema names.
- Marked as answer by shashank02 Friday, July 24, 2015 1:53 PM
Wednesday, July 22, 2015 7:23 PM