This only needs to be done in VtigerCRM 5.40!
It works out of the box in 6.x.
If you would like create Conditions with Reference Fields or have users in the vtigerCRM System, which don't have write permission for records, you have to make the following change:
Otherwise these Users won't see any colors in this read-only records.
{if $EDIT_PERMISSION eq 'yes' && $display_type neq '2' && $_readonly eq '0'} {* Performance Optimization Control *} {if !empty($DETAILVIEW_AJAX_EDIT) } {include file="DetailViewUI.tpl"} {else} {include file="DetailViewFields.tpl"} {/if} {* END *} {else} {include file="DetailViewFields.tpl"} {/if}
<td style='display:none;width:0px;' id="colorizer_{$data.fldname}" uitype='{$data.ui}' vtValue='{$keyval|@htmlentities|replace:"'":""|replace:'"':""}'></td>
If you would see any colors directly after changes of a value in DetailView, you have to insert these two snippets into one vtiger Core file.
if(module == 'Users') { data += "&form_token=" + (document.getElementsByName('form_token')[0].value); }
colorizerNewTagValue = tagValue;
else if(response.responseText.indexOf(":#:SUCCESS")>-1) {
(directly after $(“vtbusy_info”).style.display=”none”; )
/** SWARNAT EDIT START **/ colorizer_after_change(fieldName, colorizerNewTagValue); /** SWARNAT EDIT ENDE **/
Now all settings will be applied directly.