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)

Fill a subgrid in quote entity after revised with the same data

(0) ShareShare
ReportReport
Posted on by 458

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

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • Albert_ Profile Picture
    458 on at

    Can I do this in view? Via JS?

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • Albert_ Profile Picture
    458 on at

    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.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

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