You need to sign in to do that
Don't have an account?
sfadm sfadm
How to retrieve Lead record type Name?
I'm trying to retrieve the record type Name of the Lead object in the following piece of code:
but instead I receive 'Null' as a value of 'leadType'.
Please advise how to retrieve the name of the Lead record type?
Lead objLead; //constructor public LeadToMerchantController(ApexPages.StandardController controller) { objLead = (Lead)controller.getRecord(); } ... String leadType = objLead.RecordType.Name; System.debug('leadType ' + leadType);
but instead I receive 'Null' as a value of 'leadType'.
Please advise how to retrieve the name of the Lead record type?
The following worked fine for me.
Can you check if the recortypes are enabled for the lead in your org.
All Answers
Use SOQL query and set the values
The following worked fine for me.
Can you check if the recortypes are enabled for the lead in your org.