Skip to main content

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.

Enter - Partial Data Loads!

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 🙂


A sort of lazy load at the field level.

You could also achieve this by creating a secondary model for the remaining data you’d like to load only once the need arises. You’d set the condition in action framework, query the object and display the drawer.


Thanks for the suggestion Pat.  Unfortunately, as I mentioned above, introducing a secondary model (ContactSummary/ContactDetail) introduces synchronization issues between the primary & secondary models since the UI elements need to be kept in sync.  I do have some ideas behind how to solve the sync though - see #2 above for my initial thoughts and would love to hear if you have any further thoughts/suggestions.

At the end of the day, I think introducing a partial load concept would be able to take advantage of existing functionality (Query models with merge), just extending the “merge” concept to not just check for rowIds but also rowIds and “sync” status of individual fields.