Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Deleting a Lead Source

Posted on by Microsoft Employee

My company has two lead sources that are marked as *do not use* if we delete them from the list rather than keep them there what happens to the leads that had those options in the lead source field?

*This post is locked for comments

  • Suggested answer
    TheMarkChristie Profile Picture
    TheMarkChristie 10,328 on at
    RE: Deleting a Lead Source

    Hi Eric

    What I would do is have a look at your data and see if any records are using the *DNU* attribute - see who owns the record and if they can be changed (or make a business decision to change them) then you can go into the solution and remove the value from the option set list

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Deleting a Lead Source

    Hi Eric,

    LeadSource is the typical attribute used as list instead of record.

    If you can, replace it with a new entity ("new_leadsource").

    If you want to quick solve your problem, you could use the following code on form load:

    function FormOnLoad()
    {
        var leadsource = Xrm.Page.getAttribute('leadsourceattribute').getValue()
        if (leadsource != 100000001 && leadsource != 100000002) { 
            Xrm.Page.getControl('leadsourceattribute').removeOption(100000001);
            Xrm.Page.getControl('leadsourceattribute').removeOption(100000002);
        }
    }

    Please let me know.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Deleting a Lead Source

    once you delete that option from optionset , the records will have the null value left on that field instead of the value you deleted & other values from optionset will be as it is on the records.

    mark my answer as verified if helpful

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