Hi All,
I have made a custom module in SugarCRM 5.5 and wrote a custom query for extracting limited number of data from the table, so I have modified the function in root\Sugarcrm\include\SugarObjects\templates\basic \basic.php and modified the following function
function create_export_query($order_by, $where){
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT first_name, last_name, id, test FROM emp_employee_asset_tracking ";
if($custom_join) { $query .= $custom_join['select']; }
if($custom_join){ $query .= $custom_join['join']; }
$where_auto = " emp_employee_asset_tracking.deleted=0 ";
if($where != "") $query .= "where ($where) AND ".$where_auto;
else $query .= "where ".$where_auto;
if(!empty($order_by)) $query .= " ORDER BY $order_by";
return $query;
}
The above code is working perfectly fine in terms of extracting the data, now here comes the tricky part.
Now I have made another custom module and now if I am trying to export the data out of it then it is giving me error because I have written the custom code.
I have tried various things like If condition to let the system understand that I want to run my above mentioned query when I press export from first module and when i am in second module then I should be able to fetch out table from its table also.
Please anyone can help a way out for this, what condition should I put to distinguish between my two modules for their own custom queries.
Thank you...
__________________
Cheers !!


LinkBack URL
About LinkBacks



Reply With Quote


Bookmarks