function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anil87anil87 

Events on calendar link to account only

Hi Everyone.

 

When a Sales user from my production is viewing their Events on the calendar, it only links to the Account... is there a way to just have it link to the opportunity?

 

Anil

bob_buzzardbob_buzzard

Events have a Related To lookup field - if this is populated with the opportunity then the event will be linked to the opportunity.  It sounds like your users events have a Related To field that points to the account.

ForceLoverForceLover
Hi Bob,
Thanks for replying.the related To lookup field is linked to opportunity itself.
I have an opportunity named as Eventcal, it is associated to an account whose name is TEST.I created an event on opportunity with subject meeting ,relatedTo lookup with opportunity,In my home page on calender related list it showing an event like 3:00 PM - 4:00 PMMeeting : Test (which is Account) in mini pagelayout the relatedto field showing Eventcal(which is opportunity)
why i'm facing this. help me out .
bob_buzzardbob_buzzard

I don't see that behaviour.  If I create an event of 'Meeting' against an Opportunity of 'Test' against my account of 'BrightGen', it shows up in my calendar as 'Meeting: Test'

ForceLoverForceLover

Hi Bob,

 

I think i have a trigger on event will it cause this behaviour,if so can you tell me what changes i have to make on this ,here is my trigger

 

trigger NewEventLeadUpdate on Event (before insert, before update) {

 lead[] leads = new lead[ 0 ];
   
  for( event event : trigger.new ) {
   
 try{
    if( (lead.Next_Event__c == null && event.whoid != null)||(string.valueOf(event.StartDateTime) < string.valueOf(lead.Next_Event__c))){
     leads.add( new lead( id = event.whoid,Next_Event__c = event.StartDateTime ) );
    }
    }
    catch(exception e){
    // to capture the error during editing the event
    }
  }
  update leads;
}

 

bob_buzzardbob_buzzard

That doesn't look like its doing anything on the whatId field (which equates to the relatedTo).

 

Are there any other triggers on this?

 

What does the event look like if you click through on it - does the relatedTo field contain the account or opportunity.

ForceLoverForceLover
No Bob i have only one trigger, the relatedTo field contain opportunity only.