Hi there All.
I Have a Subgrid in Quote, in which there are records of my custom entity, And also the custom entity display in left side of the form,Because the custom entity has N:1 relation with quote.
Every Quote can have many of my custom entities record.
It is ok,But when I revise the Quote, I want that the same data of previous subgrid display in the new quote subgrid, as well as other fields that copy and appear from the previous subgrid.
Is there any solution or something like that?
*This post is locked for comments
Sorry Albert but order is a different entity. Yes you can retrieve the results using fetchxml but here we need to create records for the newly created qoute record.
But It does not seem logical.
I agree with your first part.
revise a quote, it create a new record with the same Quote ID.
And also the second part :
The data you see on your old quote for the subgrid is the actual records which are related to your old quote.
So there should be a way using fetchXML or something like this.
Previously I could display this subgrid in the order.
And you know Order is also a quote.
I did that with JS and using fetchXML.
I tried the previous way I did in the order, But no success.
When you revise a quote, it create a new record with the same Quote ID. The data you see on your old quote for the subgrid is the actual records which are related to your old quote. IN order to see the same subgrid records on the revised quote you need to create new records which cannot be done via view or js as you would need to create these records when the revised quote is created. The best way to do it is create a plugin.
Hope this helps.
Can I do this in view? Via JS?
Hi Albert,
You need to write a plugin on create of Quote entity which first check if the quote is a revision. If it is, then get the records from your custom entity and then either update the quote field of your custom entity or create new record with the new quote.
Take a look here for plugin code-
www.crmanswers.net/.../catch-revise-quote-message-inside-plugin.html
Hope thi shelp.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156