Question Status

Unanswered
Abhi asked a question on 9 Feb 2011 10:09 PM

I am  trying  to update option set value using post create plugin. 

Below is the code.

entity.Attributes.Add(

 "shippingmethodcode", new OptionSetValue(shippingMethodValue));

 

//  where shippingmethodvalue is int

When  i try to save this value, i get the following error :  Specified case is not valid.

Can you plz  let me know  , how to update option set value using plugin.

Thanks in Advance !!!

Reply
Rene Volkmer responded on 14 Apr 2011 12:54 AM

Hello ,

try this: entity["shippingmethodcode"] = new OptionSetValue(shippingMethodValue); Are you sure that the value in shippingMethodValue is proper value defined for shippingmethodcode pick list?

Best regards RV

Reply