3 answers
Hi Anutez,Thanks for providng the way. I tried to pull the record but now facing the challange to update the existing record and keeping the new record as active. Can you please help. I created the below code to pull the existing account information,trigger Deactivate_EP on Account_Plan__c(before insert) { Set<Id> AccountID = new Set<Id>(); for(Account_Plan__cAP: Trigger.new) { AccountID.add(AP.Account_vod__c); } List<Account_Plan_vod__c> APLIST = new List<Account_Plan_vod__c>([Select ID, Active__c,Account__c,Recordtype.Name from Account_Plan__c where Active__c = TRUE and Account__c IN:AccountID]);}After this how can I update this record present in the list.Thanks in advance,Anirban