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)

Javascript for reading subgrid values

(0) ShareShare
ReportReport
Posted on by 1,848
Hi All, I want to get the sum (qty column) from my custom subgrid using Javascript and not rollup field. And update this as estimated revenue of opportunity. {The reason I dont want to use rollup is because its not updated until I refresh it manually} Problem is when I add a new record in the subgrid it gives me error on javascript. Im wanting to call this function onSave of form. Can anyone give me a tried and tested code for this ? Im using D365.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    Whatever records you are getting on the subgrids are coming from the related entity so on save of the primary entity you can query your related entity based in entity id and get result set using retrieve multiple and have your sum.

    Check these two posts, it should give you good start if still facing any issue share it here:

    community.dynamics.com/.../219668 - Query child entity and get sum

    community.dynamics.com/.../javascript-to-sum-total-from-grid - do it in subgrid, but I will suggest to go with first one.

  • MNarmeen Profile Picture
    1,848 on at

    The problem was my subgrid displayed only few rows Expanding the number of rows solved the issue .

    Thanks anyway.

  • Community Member Profile Picture
    on at

    hi ,

    is any way to add a link of other entity in product subgrid on quotes form.. or any other way by which we use to open popup .

    actually my requirement is when we add a product than one page will open where we select no of location for that product.. 

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