Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GenDoc: can't get to related record tree
#8
OK so this is pretty much solved. What you want to do when creating related list custom functions is fall back to the default SQL when 'SQL only' is required. Suppose your custom function looks something like:
PHP Code:
public function get_custom_related($id$tabid$rel_tabid$actions false) {
 
   global $adb;
 
   // Do some custom stuff

Then you would add a couple of fallback lines:
PHP Code:
public function get_custom_related($id$tabid$rel_tabid$actions false) {
 
   global $adb$GetRelatedList_ReturnOnlyQuery;

 
   if ($GetRelatedList_ReturnOnlyQuery) {
 
       return $this->get_dependents_list($id$tabid$rel_tabid);
 
   }
 
   // Do some custom stuff

Where you would choose to fallback either on 'get_dependents_list' or 'get_related_list' based on what your custom function sees as a 'relation'.
Reply


Messages In This Thread
RE: GenDoc: can't get to related record tree - Guido1982 - 11-03-2019, 01:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)