Hello,

 

I have a master record and a detail where I allow inline editing. Making changes on the detail triggers an update on the master record. Because the table behind the master record has live updates, the changes are immediately reflected on the master record. 

All that logic works fine. The issue I have is that if the user makes changes to the master record and then changes to the detail (like adding a new detail, deleting or editing an existing one,) the changes on the master record are not saved,.

Is there any way to save the master record when the user saves the detail changes?

Thanks,
Jose

Like 0

Like

1 comments
Best reply

Hello,

Thank you for your request. Unfortunately, it is not possible to change this behavior using custom methods.
 

As a workaround, you can achieve this using development methods.

To achieve this you can to implement custom handlers for two requests:


1. When saving changes in the detail list (crt.SaveRecordsRequest)

First, execute the default logic for saving the detail records.

Then, trigger crt.SaveRecordRequest to ensure that the master record is also saved.
 

Be careful not to confuse the requests—crt.SaveRecordsRequest is for saving multiple records, while crt.SaveRecordRequest is for a single record.
 

2. When deleting records from the detail list (crt.HandleModelEventRequest)

Execute the default logic first.

Then, check if request.modelEvent.type === 'delete'.

If it is a delete operation, trigger crt.SaveRecordRequest to save the master record as well.

Hello,

Thank you for your request. Unfortunately, it is not possible to change this behavior using custom methods.
 

As a workaround, you can achieve this using development methods.

To achieve this you can to implement custom handlers for two requests:


1. When saving changes in the detail list (crt.SaveRecordsRequest)

First, execute the default logic for saving the detail records.

Then, trigger crt.SaveRecordRequest to ensure that the master record is also saved.
 

Be careful not to confuse the requests—crt.SaveRecordsRequest is for saving multiple records, while crt.SaveRecordRequest is for a single record.
 

2. When deleting records from the detail list (crt.HandleModelEventRequest)

Execute the default logic first.

Then, check if request.modelEvent.type === 'delete'.

If it is a delete operation, trigger crt.SaveRecordRequest to save the master record as well.

Show all comments