• DEEPALA SIVA
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 2
    Replies
while deleting the Accountshare through Trigger, getting the following error, can anyone please suggest me what is wrong here,

public static void accountShareUpdateBoBDelete(list<GA_AOR__c> OldaorLst , Map<Id, GA_AOR__c> OldmapAOR){
        
        List<Id> listConId = new List<Id>();
        List<Id> listAccId = new List<Id>();
        for(GA_AOR__c aor : OldaorLst){
            GA_AOR__c olAOR = OldmapAOR.get(aor.Id);
            
            if( (aor.GA_Service_End_Date__c != olAOR.GA_Service_End_Date__c && aor.GA_Service_End_Date__c <= system.today()) ||
               (aor.GA_Service_Start_Date__c != olAOR.GA_Service_Start_Date__c && aor.GA_Service_Start_Date__c >=system.today()))
            {
                listConId.add(olAOR.GA_Contact_Id__c);
                listAccId.add(olAOR.GA_Account_Id__c);
            }
            List<User> userList = [SELECT ID, ContactId 
                                   FROM User WHERE ContactId =: listConId];
            List<Accountshare> listAccshare = [SELECT Id, AccountId,UserOrGroupId
                                               FROM AccountShare WHERE AccountId=: listAccId AND UserOrGroupId=:userList and Rowcause='Manual'];
            system.debug('listAccshare--->'+listAccshare);
            If(listAccshare.size() > 0)
            {
                //delete listAccshare;
                Database.delete(listAccshare);
            }
     
        }    

calling this method in AfterUpdate
Hi All 

can any one help in writter a trigger,

when parent is deleted the related child records should be deleted.

Thanks in advance.
Hi all, 
I'm a newby in Salesforce so I decided to start learning with the Trailhead. 
I have completed all the challanghes related to the "Getting Started with the Force.com Platform". 
This morning I started with the part 2: "Intro to Visual App Development". 

The fist challenge for Workflow Atuomation is about "Automated Process with Workflow". 
I did the challenge but I receive a failure even if It should seems to run correctly in my Develper Edition Platform. 
Tha error massage received by the check challange button is "Challenge not yet complete... here's what's wrong: Case escalation failed to assign a task to the owner."

I say that all seems to work fine because I edited e case, set up the Priority to High and: 
1) The Escaleted flag was set automatically to true as per the rule action defined
2) I receive a notification about escalation on that case (because I'm the owner of the case as per the task definition field)
3) An activity under the case was automatically created and assigne to me. 

As anyone tha same problem?
Any help would be much appreciated. 
Thank's in advance,
Alvaro.