The string is not converted into optionsetvalue RRS feed

  • Question

  • hi

                     I am very new in crm. i am developing a custom application in MVC using xrmservicecontext i was create new contact reocrd.

    Its sucessfully done. but when i add dropdown list then dropdown value is not set to model value i get the error

    "The string is not converted into optionsetvalue". 

    Tuesday, June 17, 2014 9:11 AM

All replies

  • Hi,

    Can you share your code here? It seems that you're not assigning an integer value to an OptionSet field.

    Admin QuikView Solution for CRM 2013

    Tuesday, June 17, 2014 9:16 AM
  • Populate the int value of shippingMethodValue using following code:-

    entity["shippingmethodcode"] = new OptionSetValue(shippingMethodValue);

    Regards Faisal

    Tuesday, June 17, 2014 10:33 AM