[Apex Code] 如何取得 user 的 default record type?
以 Opportunity 為例
Apex Code Sample:
List<Schema.RecordTypeInfo> listRecordType = Opportunity.SobjectType.getDescribe().getRecordTypeInfos();
for(Schema.RecordTypeInfo infoRT : listRecordType){
system.debug('Record Type Name = ' + infoRT.getName());
system.debug(infoRT.isDefaultRecordTypeMapping());
}
留言
張貼留言