Skip to content

Commit

Permalink
feat: emailmessage drilldown
Browse files Browse the repository at this point in the history
  • Loading branch information
deejay-hub committed Apr 4, 2024
1 parent c540d11 commit 7e92343
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions force-app/main/default/classes/TimelineService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ public with sharing class TimelineService {
selectStatement = selectStatement + ', ActivityDate' + '';
}

if (
(objName == 'OpenActivity' || objName == 'ActivityHistory') &&
!selectStatement.contains('AlternateDetailId')
) {
selectStatement = selectStatement + ', AlternateDetailId' + '';
}

if (objName == 'ContentDocumentLink') {
selectStatement = selectStatement + ', ' + 'ContentDocumentId' + '';
}
Expand Down Expand Up @@ -330,6 +337,16 @@ public with sharing class TimelineService {

Map<String, String> typeValues = getFieldValues(tr.type, eachCh, tr.objectName);

String alternateDetailId = '';

if ( (tr.objectName == 'OpenActivity' || tr.objectName == 'ActivityHistory') &&
(String.valueOf(eachCh.get('AlternateDetailId')) != '' &&
String.valueOf(eachCh.get('AlternateDetailId')) != null) ) {
alternateDetailId = String.valueOf(eachCh.get('AlternateDetailId'));
}

mapData.put('alternateDetailId', alternateDetailId);

if (tr.objectName == 'ContentDocumentLink') {
//NOPMD
myId = String.valueOf(eachCh.get('ContentDocumentId'));
Expand Down Expand Up @@ -649,6 +666,7 @@ public with sharing class TimelineService {
private String fallbackNameField;
private String fallbackNameValue;
private String inclusionField;
private String alternateDetailId;
private Id recordId;
}

Expand Down
5 changes: 5 additions & 0 deletions force-app/main/default/lwc/timeline/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ export default class timeline extends NavigationMixin(LightningElement) {
recordCopy.tooltipId = record.tooltipId;
recordCopy.tooltipObject = record.tooltipObject;
recordCopy.drilldownId = record.drilldownId;
recordCopy.alternateDetailId = record.alternateDetailId;

recordCopy.type = record.type;
recordCopy.icon = record.icon;
Expand Down Expand Up @@ -727,6 +728,10 @@ export default class timeline extends NavigationMixin(LightningElement) {
drilldownId = d.drilldownId;
}

if (d.alternateDetailId !== '') {
drilldownId = d.alternateDetailId;
}

switch (d.objectName) {
case 'ContentDocumentLink': {
me[NavigationMixin.Navigate]({
Expand Down

0 comments on commit 7e92343

Please sign in to comment.