Posts

Showing posts from August, 2019

SFDC Code Snippets

List Map Preperation: List<Account> Acclist =new List<Account>(); Acclist =[SELECT Id,name FROM Account where name like '%TEST%']; Map<Id,String> AccountMap=new Map<Id,String>(); Set<String> AccName =new Set<String>(); for (Account accfor :Acclist) {     AccName.add(accfor.Name); AccountMap.put(accfor.Id,accfor.Name); } Map <String,Boolean> Firutornot =new Map<String, Boolean>{'Apple'=>true,'Bread'=>false,'orange'=> true,'meat'=>false}; System.debug('here MAC'+Firutornot); Firutornot.put('Apple',false); System.debug('After update'+Firutornot); -------------- public class NewWrapperClass1 {   public  String Name;   public  double Salary; } ---------------------- Calling Wrapper class: NewWrapperClass1 f1=new NewWrapperClass1(); f1.Name='ABC'; f1.Salary=1000; NewWrapperClass1 f2=new NewWrapperClass1(); f2.Name=...