Powered by Blogger.

Vtiger: How to change a module identifier (Label)

If you’ve ever tried to find an option to update a module identifier (the field that works as a link in a module) you most probably have notice that vtiger do not allow this from the field editor. The only way to do it is using vtiger development library called Vtlib.

Since very often our customers required us to change them I’m releasing the script I use every time I need to do it.

All you need to do is replace the with the name of the Module and the new field you would like to use as identifier and your are ready to go. // Turn on debugging level $Vtiger_Utils_Log = true; include_once('vtlib/Vtiger/Module.php'); include_once('vtlib/Vtiger/Field.php'); $module = Vtiger_Module::getInstance('Quotes'); $field = Vtiger_Field::getInstance('quote_no', $module); $module->unsetEntityIdentifier(); $module->setEntityIdentifier($field);

As you can see in the above example I’ve replace the identifier for the quote module from subject to the quote number.

If you need to revert this back or make a backup you need to backup the table vtiger_entityname

Free download the code snippet!

If you think this post is valuable to you please insert your email below so we can notify you of new post!
    Blogger Comment
    Facebook Comment