• Test Company 13
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hello,

I have a lead, whcih i shared mannually to a user by apex code using/
below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

User-added imageI can also see that lead is shared with user.
But when user see it it shows inssufiecuient proveliges.

what can be reason ?
I am trying to populate Notes_Preview__c on Description for event.
However it is not populating.

trigger:

if(trigger.isAfter ){
            if(trigger.isInsert || trigger.isUpdate ){
            EventTriggerUtil.updateDescription(trigger.new);
            }

class:
private static boolean Hassent = false;
    public void updateDescription(List<Event> eventList){
        List<Event> eventtoupdate = new List<Event>();
        If(!HasSent){
        for(event e:eventList){
            Event eve =new Event(Id = e.Id);
            eve.Description=eve.Notes_Preview__c;
            eventtoupdate.add(eve);
            HasSent=true;
        }
        }
        if(eventtoupdate.size()>0){
            update eventtoupdate;
        }
    
        
    }
  • April 19, 2019
  • Like
  • 0