This project has moved and is read-only. For the latest updates, please go here.


Cast Status as Picklist Error


I am trying to reference the statuscode field in the global template. when the workflow runs, it fails wit the following message.

Unable to cast object of type 'Microsoft.Xrm.Sdk.Metadata.StatusAttributeMetadata' to type 'Microsoft.Xrm.Sdk.Metadata.PicklistAttributeMetadata'
Closed Sep 19 at 4:38 PM by rtebar
Thanks srauda for your useful feedback. I have fixed this issue in the new version that you can find available in Github, see


srauda wrote Aug 26, 2016 at 11:24 PM

same error occurs if I reference the statecode field.

srauda wrote Sep 10, 2016 at 12:44 AM

installed the version and I am still getting the error message.

wrote Sep 19 at 4:38 PM