How to update records in Vtiger?

In vtiger it’s very simple to update a record in module. First include your module file in your working file. Then copy below code and use in your file and replace constant to your variables.

$focus = CRMEntity::getInstance('MODULE_NAME');
$focus->retrieve_entity_info('ENTITY_ID', 'MODULE_NAME');
$focus->id = 'ENTITY_ID';
$focus->mode = 'edit';
$focus->column_fields['FIELD_NAME'] = 'FIELD_VALUE';

Leave a Reply

Your email address will not be published. Required fields are marked *