I work on one project, users actively use PDF templates in CRM, the fact is that I need to get the field value in the SalesOrderPDFContoller.php file: I used this code:$this->focusColumnValue('input_name')
; So I should get the value from the Products module, but instead of the value i get 0.
Asked
Active
Viewed 239 times
0

Raite
- 5
- 1
- 3
1 Answers
0
$this->focusColumnValue() is used to get Salesorder field value not Product value.
If you know the Product id you can use :
$recordModel = Vtiger_Record_Model::getInstanceById($id, 'Product');
$your_input = $recordModel->get('input_name') ;

Jérémy
- 151
- 6
-
Jeremy,thanks for answering my question,i'm a newbie in Vtiger, how can i get the product id in SalesOrderPDFController.php when i export record in PDF in SalesOrder module? – Raite Feb 21 '19 at 07:39
-
I think you can call the function loadRecord like this : **$this->loadRecord($id);** (where $id is the SalesOrder id) And then Products id related to SaleOrder will be available in **$this->associated_products** variable – Jérémy Feb 21 '19 at 13:49