Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Delete system attribute mapping

(1) ShareShare
ReportReport
Posted on by 110

Hello,

I have a problem to delete mapping between lead and opportunity.  I have removed the dependencies (which means a field on the form) but still I am having an error message that "Cannot create or delete system attribute map having id ----------------------- from leadid to originatingleadid belonging to an entity map with id ------------------------- from lead to opportunity.

I found out that there has been earlier discussion of this topic but that does not offer a solution for me.

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/376660/cannot-delete-attribute-map

Anyone knows what to do with it?

 

  • meelamri Profile Picture
    meelamri 13,206 User Group Leader on at
    RE: Delete system attribute mapping

    Hi,

    would you please close this thread ?

  • Verified answer
    Gilmeyer Profile Picture
    Gilmeyer on at
    RE: Delete system attribute mapping

    Hi,

    This is CRM intended behavior. Whenever you create a lookup field (or its relationship), there is an automatic mapping between the lookup field and the primary key attribute of the source entity in the relationship. In your case, the mapping is between leadid which is the primary key attribute of source entity Lead and the lookup field originatingleadid . This is the system mapping created for this lookup field. You cannot delete it.

  • RE: Delete system attribute mapping

    Hi Tuomas,

    Allow me to ask you why would you want to delete a system attribute mapping?

    Regards

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,206 User Group Leader on at
    RE: Delete system attribute mapping

    Hi,

    It's a known old issue. Unfortunately, You can't delete those mappings. You can clear your data using some JS code. Please refer to the sample code below:

    
    function cancelMappings(executionContext) {
        var formContext = executionContext.getFormContext();
        if (formContext.ui.getFormType() == 1) {
            var mapping1 = formContext.getAttribute("prefix_mapping1");
            if (mapping1.getValue() != null)
                mapping1.setValue(null);
        }
        else
            return;
    }

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans