Thanks you so much for this solution. I also want to ask one more thing when i select any record from Floor entity (it's a custom entity), it is always select it's id. i want to select it's office number.
Can you please help me out.
Add custom text color to field
Collapse
X
-
In order to make your customization "upgrade safe" you need to:
copy the code from client/res/templates/list.tpl to a custom template "client/custom/res/templates/list.tpl"
insert a div tag with your text inside it above the line <div class="list-container">{{{list}}}</div>
copy the code from client/src/views/list.js to a custom view "client/custom/src/views/list.js"
modify the line template: 'list' with "template: 'custom:list'" to call the above custom template
specify your custom view at the parent entity's ("Floor") clientDefs as:
"views": {
"list": "custom:views/list",
"detail": "custom:views/generic/detail/header/close"
},Leave a comment:
-
In 5.5.3 it's possible to display enum fields as labels (a new field parameter).Leave a comment:
-
The different colours are not easy to distinguish for people with glasses. The lines of the font are too narrow.
of an alternative :
Leave a comment:
-
In the newest version you can set option color in Entity Manager
1 PhotoLeave a comment:
-
No, you can change entityDefs in custom, but you use the default view of this field, This view does not support style definition in entityDefs
Read this article https://www.espocrm.com/documentatio.../custom-views/ Field ViewLeave a comment:
-
Leave a comment:
-
example https://github.com/espocrm/espocrm/b...s/Task.json#L8
1. "[option]" - you don't have this option in "options", why did you add it?
2. after fixing check, if json is valid.
3. Administration > Clear Cache > Refresh the page
4. It won't work if you use it as link, but you can fix it
EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.
https://github.com/espocrm/espocrm/b.../list-link.tpl
{
"fields": {
"stage": {
"type": "enum",
"options": [
"Prospecting",
"Value Proposition",
"Id. Decision Makers",
"Negotiation/Review",
"Ganho sem arquivar",
"Closed Won",
"Encaminhado para Parceiros",
"Closed Lost"
],
"view": "crm:views/opportunity/fields/stage",
"default": "Prospecting",
"audited": true,
>> "style": {
>> "Ganho sem arquivar": "success"
>> },
"required": false,
"isSorted": false,
"probabilityMap": {
"Prospecting": 10,
"Value Proposition": 30,
"Id. Decision Makers": 70,
"Negotiation/Review": 0,
"Ganho sem arquivar": 100,
"Closed Won": 100,
"Encaminhado para Parceiros": 0,
"Closed Lost": 0
},
"fieldManagerAdditionalParamList": [
{
"name": "probabilityMap",
"view": "crm:views/opportunity/admin/field-manager/fields/probability-map"
}
],
"readOnly": false,
"tooltip": false
},Leave a comment:
-
example https://github.com/espocrm/espocrm/b...s/Task.json#L8
1. "[option]" - you don't have this option in "options", why did you add it?
2. after fixing check, if json is valid.
3. Administration > Clear Cache > Refresh the page
4. It won't work if you use it as link, but you can fix it
EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.
Leave a comment:
-
Tried to apply colors to Lead, but without a success. Code from custom\Espo\Custom\Resources\metadata\entityDefs\L ead.json below:
"status": {
"type": "enum",
"options": [
"",
"Payment",
"Admission",
"Visa",
"Start",
"Paused",
"Commission claim",
"Visa refusal",
"Cancel",
"Follow up"
],
"default": "Payment",
"view": "views/fields/enum-styled",
"style": {
"Payment": "success",
"Commission claim": "danger",
"Follow up": "danger",
"[option]": "[style]"
},
"required": true,
"isPersonalData": false,
"isSorted": false,
"readOnly": false,
"tooltip": false
},
Also in case field is marked as "link" in Layout manager - will it work also? I suspect that I need to change code somewhere else)Leave a comment:
-
try "default bg-info"Leave a comment:
-
Hey tanya I'm trying to change bg color for opportunity -> stages, but it seems like it uses his own custom view- Here is the code that I'm using :
"view": "views/fields/enum-styled",
"style": {
"Negotiation/Review": "bg-success",
"Prospecting": "bg-info"
},
I also check this file client/modules/crm/src/views/opportunity/fields/stage.js but not sure if I can add the styles here to make it work.
any Tip will be appreciated - Thanks,
Leave a comment:
Leave a comment: