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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Adding custom field mapping between quotedetail and salesorderdetail entity.

(0) ShareShare
ReportReport
Posted on by 370

Hi,

I have a global option set named Remarks (custom field) on both quotedetail and salesorderdetail entity.

I want that on creation of order from the quote the remarks field value gets auto populated on corresponding

salesorderdetail entity with the values on quotedetail entity.

How can i add this mapping ?? as i can not find the existing relationship between them from the UI.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    You need to create a lookup/relationship between your Quotedetail and salesorderdetail entity. Once it is created you can open this relationship and on the left you have the mapping option where you can define the inherit properties.

  • Prem27 Profile Picture
    370 on at

    unabletocreaterelaTION.png

    Hi Guillaume,

    i am unable to create a relationship between quotedetail and salesorderdetail . I can't find quotedetail while creating relationship.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Prem,

    I took a look into it. Yes you can't do it, but what you can do is 3 relationships. One between Quote and Quote Detail; another between Order and Salesorderdetail and the last between Quote and Order.

    Then you can define the different mapping that you need hope this helps.

    If it doesn't work. You will need to create a pre-create plugin in order to do it or if you want to see it directly when you are editing/creating your order with JScript and a WebApi call to set the correct value

  • Verified answer
    Prem27 Profile Picture
    370 on at
  • Suggested answer
    Kjeld Poulsen Profile Picture
    180 on at

    This solution works, but it has a drawback. After version 9.0 you can no longer transport these maps over a managed solution from you sandbox to your produktions environment.

    You will get an error saying something like:

    A managed solution cannot overwrite a AttributeMap component on the target system that has an unmanaged base instance.  The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged AttributeMap component on the target system, and now a managed solution from the same publisher is trying to install that same AttributeMap component as managed.  This will cause an invalid layering of solutions on the target system and is not allowed.

    To overcome this problem I had to remove the maps again, and write plugin code that did the additional mapping. The plugin code i have created is

    1) make sure that each quote line get a lineitemnumber assigned (unique within the quote). if you only use the standard ui for creating lines, i think you are all set here. it is already done.

    2) The lineitemnumber IS part of the standard map when a salesorder is created from a quote(I assume the same goes for opportunity->quote  and salesorder -> invoice)

    3) now on pre-create-event for salesdetail, lookup the salesorder, if it has a reference in QuoteId, lookup the quote detail from quiteid + lineitemnumber, and take field content from there.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans