CRM 2011 Programatically Finding the Values of Picklists, Optionsets, Statecode, Statuscode and Boolean (Two Options)

When developing for CRM 2011 I’m pretty much always going to be setting the values of picklists (local and global optionsets), statecodes, statuscodes and booleans (two options) – the sorts of fields I’m talking about here are the ones highlighted in orange below. Usually I will know the label off the top of my head but I don’t always have the actual number value which is required to set the attribute correctly.

Continue reading