Iâ€™ve been working with solutions and web resources a lot lately so this next series of articles will focus on Solutions and Web Resources.
Importing an object into the Default/Active solution
Actually, it would be really neat if the tool could just import it directly as part of the post-conversion process.
The issue lies in the fact that Web Resources reside inside of a Solution, so you must know which solution to either query against or write to.
Normally, this would require you to query the solutions within an Organization to locate the solution you wish to use. But what if you want to use the Default solution?
Lucky for us, it turns out the Default solution actually has a consistent SolutionId which will be the same across any CRM installation.
I found this little nugget in the CRM 2011 SDK, here. Letâ€™s review the data:
We actually have two pre-defined SolutionIds:
The Default solution does not contain any solution components. It contains references to all the managed and unmanaged solution components in the system.
The Active solution represents the current published unmanaged customizations that define the behavior of the application.
The Default SolutionId, in all honesty, is mostly for reference, or so it seems to me.
The Active SolutionId is the one that you would use as a reference to query or insert objects into the Default solution.
Once an object, say a Web Resource, has been installed in the Default solution, can you always add it to other solutions using the Add Existing functionality of the solution explorer.
This may not seem like much, but it will save you at least one query to get the Default SolutionId and any time you can reduce the amount of code you have, the better.