create_export_query
is a method in SugarBean (/data/SugarBean.php
is the base class for nearly all SugarCRM objects) and can be overriden in the bean's core class file. So if you have custom module MyModule
you can find the core class in /modules/MyModule/MyModule.php
There is likely not a create_export_query() method there currently, so you can write one in. It'll look something like this:
<?php
require_once("include/SugarObjects/templates/basic/Basic.php");
class MyModule extends Basic{
public function MyModule(){
parent::Basic();
}
public function create_export_query(&$order_by, &$where, $relate_link_join=''){
$query = " select * from {$this->table_name} "; // build your query string however you like
return $query;
}
}