Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I am stuck at a field mapping situation and just can't find the issue here...
It concerns Products and Quote Products: Because we are using templates to create Quotes I have mapped the standard description field of the product to the quote product (1:N relationship) - this works just fine. In this way, users can look for the product they want to add to their quote and see right away the description of the existing product. This field is also used in our Quote template - so the users have the text filled in automatically but could still make changes without editing the initial description of the actual product. Hope I explained it clearly.
Now I have created a custom field (Multiple Lines of Text with max length. 1.000) for Product and created another Multiple Lines field with the same max. lenght for Quote Product. I wanted to map it the same way that I mapped the standard description field - but for some reason it just does't work.
The value of my custom field is just not copied into the quote product... I am absolutely clueless where the issue could be - I have made sure that it is exactly the same type of field and it is both shown on the form.
Does anyone have an idea whats going on? Am I missing a requirement?
Thank you so much in advance for your help!
Relationship mapping for this relationship (Existing Product) is not configurable.
Register following sample function on change of the Existing Product lookup to set the multi-line field:
const formContext = executionContext.getFormContext();
// Get Existing Product Lookup Value
const existingProd = formContext.getAttribute("productid").getValue();
const id = existingProd.id;
const entityType = existingProd.entityType;
// Get Description from the Product
Xrm.WebApi.retrieveRecord(entityType, id, "?$select=description").then(
const description = result.description;
console.log("Retrieved Description:" + description);
// Set Description Field on Quote Line
I am copying Product Description to Quote Line Description, you may rename the field names as per your need.
Also, do not forget to pass the execution context as the first parameter.
Here is how it should be registered:
thank you for your reply! That's really a bummer, I thought since it works for the standard fields, why wouldn't it work with custom fields..
Unfortunately I have no experience at all with coding so I really don't know where to insert or how to apply what you proposed.
I might try to find a different out of the box solution for our situation without coding..
The product and the quote product is 1:N relationship, so you need populate one field of child records with value from parent record.
Maybe you can try to use power automate to create an automated flow to achieve it, which is a no-code way.
1.Go Power Automate(https://us.flow.microsoft.com/en-us/ )
3.Add condition action.
4.Add 'Get a row by id' action under yes branch.
5.Add Update a row action.
Overview of the flow:
Create a quote line with the product: P1
After clicking save button and refresh button, the description EN field of quote product has been filled with value from P1 product automatically.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Otherwise, you can use the approach provided by Leah (but it will run asynchronously, this means the description will be copied with a noticeable delay).
Thank you so much both of you!! Super great help!
I went with Leah's option - I think we can live with that few seconds that it takes to see the text.
Thank you so much again for your great support!
I have one additional question that now popped up after using it for a while:
When the user updates the field in the quote product, it should not be changed back to the product field.
In the flow trigger I can only chose "Create or Update" but it should only update the first time the quote product is created.
Once its created, the description field should be able to be editable.
But the flow shows me an error if I chose the trigger to be "Create" only - is there a way to restrict this??
Thank you !!
Business Applications communities