Customise Activity and History Bottom Panels
Collapse
X
-
Hi Rabii. Thank you again for your prompt reply and very helpful support. Using your examples, I've now been able to create custom activity and history bottom panel views with one line per record for both accounts and contacts.
I really appreciate the time and effort you have spent helping me with this and hope it helps other users too.
-
Hey crmscot,
For history panel you need to create a custom history.js similar to the activities (same steps), it uses a listLayout rather than defaultListLayout, here is the code below
PHP Code:define('custom:views/record/panels/history', ['crm:views/record/panels/history'], (historyRecordView) => {
return class extends historyRecordView {
listLayout = {
'Email': {
rows: [
[
{name: 'ico', view: 'crm:views/fields/ico'},
{
name: 'name',
link: true,
},
{
name: 'dateSent',
soft: true
},
{
name: 'status',
},
{
name: 'hasAttachment',
view: 'views/email/fields/has-attachment'
},
]
]
},
}
}
});
Regarding the width params i am afraid it is supported as the activities and history panel use a list-expanded.js view which doesn't process the width expect for the right section (the actions column) therefore it is not supported and the only way i know of to make it possible, is to create a custom list-expanded.js view and add the width params then use it in your custom activities and history panel.
You can use the false param to create space between fields it might help (e.g double false,fasle - would add two spaces)👍 1Leave a comment:
-
Thank you very much Rabii for your help. I've done what you suggested and got it working for activities and history bottom panels for both Accounts and Contacts. Great!!
I have a couple of further questions if I may ask your advice:-
Is there a way of displaying the 3 fields with fixed widths (to give a tabular view) - something like the % width parameter available for list views?
On the history tab, email records still display on two lines though meetings, calls, etc show as I wanted on one line per record.
Thanks again for your kind assistance. -
That is doable you just need a custom activities view and provide a different layout and that should work.
Here is what you need to do:
1- Create the custom activities.js view under client/custom/src/views/record/panels - copy the code below
PHP Code:define('custom:views/record/panels/activities', ['crm:views/record/panels/activities'], (activitiesRecordView) => {
return class extends activitiesRecordView {
defaultListLayout = {
rows: [
[
{name: 'ico', view: 'crm:views/fields/ico'},
{name: 'name', link: true, view: 'views/event/fields/name-for-history'},
false, // represent space use it to put space between fields
{name: 'dateStart', soft: true},
{name: 'assignedUser'}
]
]
}
}
});
2- Now you need to define the new custom activities view into the desired entity (If you want to apply this to all entities you will have to repeat this for all clientDefs of each entity). Here is an example below how to use it in Opportunity. Create a new Opportunity.json under custom/Espo/Custom/Resources/metadata/clientDefs - copy the code below
3- Now just clear the cache and rebuild the system and you should see the new layout applied to the opportunity. see attached screenshot before and after.PHP Code:{
"bottomPanels": {
"detail": [
{
"name": "activities",
"reference": "activities",
"disabled": true,
"view": "custom:views/record/panels/activities"
}
]
}
}
I hope this help
Leave a comment:
-
Hi Yuri. Thank you for your prompt reply (and excellent software!!). I understand that additional fields could be tricky. I agree that white space is important on a screen but feel, in this case, displaying the three existing fields on a single line per record would enhance useability. -
Since a UNION SQL expression is used for Activities and History panels, adding additional fields is tricky. Free space is not always bad, actually it's often good
Leave a comment:
-
Customise Activity and History Bottom Panels
I'm looking for some help in customising the Activity and History views in bottom panels (V9.0.6).
Using a wide view, there's a lot of white space in the bottom panels for activity and history, with each record taking 2 lines. This is fine for narrow, side panel views of the data but, I feel, could be improved for bottom panel use.
Also can't see how to alter the fields showing in these panels. I've done it successfully for cases (using the list small settings) and get one line per record but there are no entities visible for customisation for activities and history.
Any advice will be greatly appreciated.Tags: None

Leave a comment: