The custom action framework provides a great way to defer loading of data until it is needed. However, there are scenarios where related data is needed on initial page load but not all the data.
Use Case - An Account detail page contains a table of related contacts on the same page. The table shows a few fields that provide context to the contact (e.g. Name, City, phone #, etc.). The table has a drawer that contains a field editor (or anything else) that that provides the full context for the contact. The table is just a “summary” while the drawer is the full “detail.” The user can edit information in either the table row or the drawer and it needs to stay in sync.
To accomplish this today, there are two options that I can think of:
1) Account and Contact marked to load data on page load. This pulls down all information for all records which would be very “heavy”.
2) Account, ContactSummary & ContactDetails models. Sink ContactSummary & ContactDetail model/row events and programatically update the corresponding fields in the other object. Can’t use the “requery” because the data needs to come from the client not the server.
- Possibly if there was a way to specify a “query source” for the Query Model(s) action?
- Possibly if there was an action type of “sync models” or “update field(s) on row with same name(s)”? Given there could be a large number of fields, specifying each individual field to update declaratively would be a maintenance challenge.
If there was way on a field level to mark it as “always load” or “defer load”, then the existing functionality of the action framework could be leveraged. Contact would only get partial data on initial page load, enough to populate the table. Then, on row action, the model could be queried to “merge” data and force the reamining fields to come down.
Food for thought…thanks for listening