web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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?

 

  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    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;
    }

  • Miguel Lourenco Profile Picture
    Microsoft Employee on at

    Hi Tuomas,

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

    Regards

  • Verified answer
    Gilmeyer Profile Picture
    Microsoft Employee on at

    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.

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Hi,

    would you please close this thread ?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 46 Super User 2026 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 37 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans