Drawer will not re-query if opened more than once

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
I have a drawer for activities coming off of a Contact table.  When I open the drawer for the first Contact, everything is perfect.  It shows all the activities for that contact.  Then I open the drawer for a second contact and everything is fine as well for that contact.  However, when I click back to the first contact and open the drawer it is now displaying the data for the second contact I clicked on.  

How do I get the drawer to re-query the model EVERY TIME I open the drawer and not just the first time?
Photo of Stephen Chilcoat

Stephen Chilcoat

  • 732 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Stephen Chilcoat

Stephen Chilcoat

  • 732 Points 500 badge 2x thumb
I believe we need "reload actions" in addition to "before load actions" on drawers.  The drawer simply doesn't execute the before load actions again if you open a drawer multiple times.
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
You probably need to change 2 things:
1) on your model query (before load action on the drawer) set it to be 'Get more - merge in new rows with old' instead of 'Standard - completely replace data.'  This will keep both drawer data sets.

2) To get the correct activities to show for the contact once you have queried more than once, you need to go into your drawer and on your table, set a context condition so the WhoID of the activity is = Id of the contact in context.

Give that a try and let me know if you need some screen shots.
Photo of Stephen Chilcoat

Stephen Chilcoat

  • 732 Points 500 badge 2x thumb
Thank you Chandra.  That did the trick!