Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. List<Contact> conLIST = [Select Id From Contact LIMIT 10];
  2.  
  3. Set<Id> conIds = TMNL_SOQL_Util.getIdSet(conLIST);
  4.  
  5. conLIST = TMNL_SOQL_Util.getRecords( conIds );
  6.  
  7. //system.debug(LoggingLevel.INFO,'\n\n\nContact 0 \n'+JSON.serializePretty(conLIST[0])+'\n');
  8.  
  9. Set<Id> parentAccounts = TMNL_SOQL_Util.getParentIds(conLIST,'AccountId');
  10. //system.debug(LoggingLevel.INFO,'\n\n\nParent Ids\n'+JSON.serializePretty(parentAccounts) );
  11.  
  12.  
  13. //Map<Id,sObject> accMap = TMNL_SOQL_Util.getCachedMap(parentAccounts) ;
  14. TMNL_SOQL_Util.getCachedMap(parentAccounts) ;
  15.  
  16. //List<Account> accList = (List<Account>) accMap.values();
  17. //Map<Id,Account> accMap2 = Map<Id,Account>( accList );
  18.  
  19. //ystem.debug(LoggingLevel.INFO,'\n\n\nAccMap\n'+JSON.serializePretty(accMap) );
  20.  
  21. Account acc0 = (Account) TMNL_SOQL_Util.getCached(conLIST[0].AccountId);
  22.  
  23. //acc0 = (Account) TMNL_SOQL_Util.getCached(con[0].AccountId);
  24. //acc0 = (Account) TMNL_SOQL_Util.getCached(con[0].AccountId);
  25. //acc0 = (Account) TMNL_SOQL_Util.getCached(con[0].AccountId);
  26. //acc0 = (Account) TMNL_SOQL_Util.getCached(con[0].AccountId);
  27. //acc0 = (Account) TMNL_SOQL_Util.getCached(con[0].AccountId);
  28.  
  29.  
  30. system.debug(LoggingLevel.INFO,'\n\n\nAcc 0\n'+JSON.serializePretty(acc0) );
  31. //system.debug(LoggingLevel.INFO,'\n\n\nTEST1\n'+acc1);
  32. //system.debug(LoggingLevel.INFO,'\n\n\nTEST2\n'+acc2);
  33.  
  34. if ( TMNL_SOQL_Util.inCache(so.Id) ) TMNL_SOQL_Util.cache(Trigger.newMap.get(so.Id));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement