Monday, April 6, 2015

Microsoft Dynamics CRM - Fields Could Not Be Found

I'm creating a plugin to a new instance and I was stuck in a problem, were a lot of fields (as per the error) are missing. See the figure below.


Problem:
All fields mentioned in the image above, are OptionSets. The compiler for some reason, could not find the definition of the fields above but when you check the entity, the fields does exist. 
Solution:
I notice first, that all OptionSet above does not have any value.
Option 1 - since this is a new instance and no value is present in the OptionSet, you can comment the error. However you need to comment again if you need to regenerate a fresh early-bound classes.
Option 2 - assigned at least one value to the OptionSets.
I regenerated the early-bound classes and recompile and all the errors are gone.

I hope this helps.

No comments:

Decode URL with confidence

Yesterday, while configuring a Unified Service Desk to automatically display a dashboard, I need to obtain the Dashboard GUID. The fi...