Showing posts with label Default. Show all posts
Showing posts with label Default. Show all posts

Monday, December 2, 2019

How to make default Landing Page as Setup page in Salesforce

To make the default landing page as setup page, go to the 'Advanced User Details' of the user and enable the 'Make Setup My Default Landing Page' permission.


Wednesday, August 14, 2019

How to get Default Record Type Id of object using apex in salesforce

In this example, I am getting Account object default record type Id

Example
Schema.DescribeSObjectResult describeResult = Account.getsObjectType().getDescribe();
List<Schema.RecordTypeInfo> rtInfos = describeResult.getRecordTypeInfos();
for(Schema.RecordTypeInfo rtInfo : rtInfos) {
    
    if(rtInfo.isDefaultRecordTypeMapping()) {       
        System.debug('Default Record Type Id ====> '+rtInfo.getRecordTypeId());
    }
}  

Result