1
votes

I am having a sub grid in the crm form 2011. When I add a new record, I want the count to be updated in the field i added in the header.

The problem is that when I add a new record I need to refresh the form otherwise, the count will not take the newly added record into consideration.

Is there any way I can refresh the grid soon after I add a record the count gets updated?

I use Jscript to count the records.

1
can you give more detail regarding how the record is added, you absolutely should be able to refresh the grid and the count.Glenn Ferrie
Hi I just go to the sub grid and click add new and give the details . when the record is created I want to recount the records in sub grid and display on the parent form in the header. can u help pleasepinki

1 Answers

1
votes

Assuming your JScript to count the subgrid's records exists in the parent form, it sounds like what you need to do is ensure this code is fired when the contents of the subgrid change.

There's an example of how to do this here - what you need to do is attach an event handler to the subgrid's refresh event. So, when the subgrid refreshes, your handler (in the parent form) is called, and can re-count the records at that time.