Editable subgrid data update on save

Question Status

Verified
sathish1109 asked a question on 13 Aug 2017 2:38 AM

Hi

   I have an custom timesheet entity where I have a field "actual hours" which is updated by setting the difference in start and end time.I also have a decimal field "total " where it is calculated from actual hours.I also have another test entity where the data of timesheet enity are stored in an editable subgrid. I have done a script to calculate actual hours in the editable subgrid on change of start time and end time on the grid.  Actual hours is getting calculated in the grid record and the timesheet record .But "total " field is getting updated only on save of the form . So on update of data from editable subgrid, though the actual hours  is getting updated in the form, total is not getting updated. Any suggestions for updating total on change of actual hours from the grid.

Reply
Verified Answer
Neil Parkhurst responded on 13 Aug 2017 4:30 AM

When you say script, I assume you mean JavaScript that is being triggered by the editable grid.

Have you included the total field in the editable grid? I suspect it might need to be included.

If this doesn't solve you issue could you post a copy of your script. It might be that seeing your script will help provide an answer to your issue.

Reply
sathish1109 responded on 13 Aug 2017 8:30 AM

Hi Neil Parkhurst,

   Your idea of adding total field to editable grid will help me solve the problem. But based on my requirement the view should not contain total field in the subgrid. Is there a chance that i can add the field to the grid and hide it from the view.?

Reply
Verified Answer
sathish1109 responded on 13 Aug 2017 10:09 AM

Hi,

   I ve achieved my requirement using a business rule with scope as "Entity". 

Thanks  and regards,

Sathish kumar S

Reply
Verified Answer
Neil Parkhurst responded on 13 Aug 2017 4:30 AM

When you say script, I assume you mean JavaScript that is being triggered by the editable grid.

Have you included the total field in the editable grid? I suspect it might need to be included.

If this doesn't solve you issue could you post a copy of your script. It might be that seeing your script will help provide an answer to your issue.

Reply
Verified Answer
sathish1109 responded on 13 Aug 2017 10:09 AM

Hi,

   I ve achieved my requirement using a business rule with scope as "Entity". 

Thanks  and regards,

Sathish kumar S

Reply