AnsweredAssumed Answered

Refresh lookups from relate field

Question asked by Andrew Rappaport on Sep 21, 2019

I have created a custom module (call it module A) with several fields that are relate fields from another custom module (call it module B). I have created a vardefs extension for each of these relate fields that looks up data from Module B and populates it into Module A each time a record from that module is linked via one of the relate fields. I have used multiple relate fields rather than many-to-many relationships since having a separate relationship for each case where we need to link from module A to module B within a record would make for a very cumbersome user interface and we don't need reverse visibility of these links (ie from Module B to Module A).


This implementation works fine, except that I have not been able to find a way to refresh the lookups if the data in the linked record in module B changes after its been linked (as would happen if I used relationships and calculated fields). The only way I have found to update the data is to change the related record to a different one and then change it back, which is obviously not an acceptable solution.


Any suggestions for a good way to force a lookup and repopulate Module A fields every time the record view in Module A is opened? 


I am using Sugar 8.1