Quantcast
Channel: CRM Development Forum
Viewing all articles
Browse latest Browse all 888

CMR 2011: Getting OptionSet value in Workflow

$
0
0

Hi everybody,

 

I have created a workflow in which I need to get a option set value.When I try to get the participant type, I get an NullReferenceException. If I comment out the participanttype code, the workflow runs successfully.

My code is below

//Get the participant type option value
Participant p = new Participant{name = Name.Get(executionContext),ParticipantType   = ParticipantType.Get(executionContext).Value
};// In Args
        [Input("ParticipantType")]
        [AttributeTarget("transaction_address", "participanttype")]public InArgument<OptionSetValue> ParticipantType { get; set; }
The entity I'm running the workflow against is a transaction_address entity, the attribute is named participanttype. Participant Type is a global optionset.

 

How do I get the optionset value?

Thanks in advance.

 



Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>