asked on July 19, 2021

Lookups are no longer running on form load within my task. They wait until the user changes a field. It seems to only be with saved draft tasks and not tasks without saved drafts, but not sure what the difference is.

I am trying to determine how to get lookups to run on form load and why the callbacks are being called without actually running the lookup? These are false positive callbacks. The best method I can find is to wait 500ms from time of form load and then trigger the lookup field with a .change() method.

This form has only 1 lookup for the table at the bottom, as an example. I must manually change the lookup trigger field, to something else and back, in order to see the data.

Why would the console show a callback for onloadlookupfinished, which is only a callback designated to lookups called on load, not on field change. There is no possible way my lookup was called on load as you can see in the video by the fact that the data was out-of-date from the initial load to when I triggered the field manually.

The first lookupcomplete is a very unusual call, since that can only be called when a user manually changes a field. I had just loaded the form, it was called before the form was even loaded. At this point, I don't trust callbacks at all anymore.

    $(document).on("lookupcomplete", function(){
    console.log('lookupcomplete');
  });
  
  $(document).on("onloadlookupfinished", function(){
    console.log('onloadlookupfinished');
  });

 

0 0