Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to Change lookup field to optionset field

Posted on by

Hi Guys,

I have two entities. i create relationship between two entities and add lookup field to one entity but in my requirement i want to change my lookup field to optionset type. It is any possibility is there for change lookup to optionset. anything is there means please tell me guys

Thank You

*This post is locked for comments

  • Suggested answer
    Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: How to Change lookup field to optionset field

    Hi Dinesh,

    We cannot modify the field data types after creation. so the only option you left with creating a new optionset type field. if you are concerned about data then, you can just create a ondemand workflow and map the data accordingly. then you may execute the workflow upto 250 records at a time (from advancefind/homegrid) or if you have many more then you can run the workflow through a simple console

    // Create an ExecuteWorkflow request.
                        ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
                        {
                            WorkflowId = _workflowId,
                            EntityId = _leadId
                        };
                        Console.Write("Created ExecuteWorkflow request, ");
    
                        // Execute the workflow.
                        ExecuteWorkflowResponse response =
                            (ExecuteWorkflowResponse)_serviceProxy.Execute(request);
                        Console.WriteLine("and sent request to service.");
    

    Increase number of  records per page - https://arunpotti.wordpress.com/2015/08/12/increase-number-of-records-per-page-in-ms-crm/
    sample code link - https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/sample-run-workflow

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: How to Change lookup field to optionset field

    Sorry you cant change the field type once you created the filed . The only options is to create new field and do update data using console application for optionset.

  • Suggested answer
    Charles Abi Khirs Profile Picture
    Charles Abi Khirs 3,569 on at
    RE: How to Change lookup field to optionset field

    Hello,

    Mainly you cannot do it from the D365, you have to delete the field and recreate it; However, you can always try the plugin "AttributeManager" of the XrmToolbox that is used to rename/delete/or change the type of an attribute: www.xrmtoolbox.com/.../DLaB.Xrm.AttributeManager

  • Suggested answer
    mjcmc Profile Picture
    mjcmc 65 on at
    RE: How to Change lookup field to optionset field

    Unfortunately there's no way to change the data type of a field once it's been created. If you have existing records that use the lookup and you want to capture that in an optionset, your best bet is to create the optionset field and then run an SSIS package to map the lookup values to optionset values. Then you can delete the lookup field

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans