Guest User

Untitled

a guest
Jul 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Contact cont = new Contact(LastName = 'TestLast');
  2. insert cont;
  3. Id defaultRtId = [SELECT RecordTypeId FROM Contact WHERE Id = :cont.Id].RecordTypeId;
  4.  
  5. Account a = (Account)Account.sObjectType.newSObject(recordTypeId,true);
  6.  
  7. Map<String,RecordTypeInfo> infos = Account.sObjectType.getDescribe()
  8. .getRecordTypeInfosByDeveloperName();
Add Comment
Please, Sign In to add comment