salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

customCode for field gets not evaluated in ListView (but works in Detailview) #10369

Open gunnicom opened 4 months ago

gunnicom commented 4 months ago

When adding "customCode" to the definition in a Detailview to a field in file metadata/detailviewdefs.php like: 'customCode' => '{if $fields.name.value=="Boss"}<b>{$fields.name.value}</b>{else}{$fields.name.value}{/if}' It will display the name in Bold when it is the "Boss". If you put the same code in metadata/listviewdefs.php ListView will Display the Code but does not evaluate the Smarty Code.

Expected Behavior

customCode should work for all (or most) metadata definitions the same.

Actual Behavior

Smarty Code does not get evaluated.

Steps to Reproduce

  1. Add "customCode" definition to a field in metadata/listviewdefs.php
  2. Quick-Repair (or delete cache/themes folder)
  3. Look at list view in GUI

Context

Your Environment