Dynamics crm

ITsolutionWizard
ITsolutionWizard used Ask the Experts™
on
I have dynamics crm 2011 and I need to add new items into one of the existing option set?

How to code the calls in web services? Or wcf.

We have it on premise.

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Microsoft Dynamics CRM Consultant
Commented:
Hi,

You can add new options by following code:

InsertOptionValueRequest request = new InsertOptionValueRequest()
{
    EntityLogicalName = EntityLogicalName,
    AttributeLogicalName = "attributeLogicalName",
    Label = new Microsoft.Xrm.Sdk.Label(Item.ToString(), 1033)
};

InsertOptionValueResponse response = (InsertOptionValueResponse)OrgService.Execute(request);

Open in new window


For more details- https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.messages.insertoptionvaluerequest(v=crm.5).aspx

Regards,
Rikin
Rikin ShahMicrosoft Dynamics CRM Consultant

Commented:
Proper solution to the question.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial