Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gunnicom opened this issue Feb 26, 2024 · 0 comments
Open

Comments

@gunnicom
Copy link
Contributor

gunnicom commented Feb 26, 2024

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

  • SuiteCRM Version used: 7.14.2
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome
  • Environment name and version (e.g. MySQL, PHP 7): PHP 8.2
  • Operating System and version (e.g Ubuntu 16.04): Ubuntu 22.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant