You need to sign in to do that
Don't have an account?

Can't fetch RecordType Name on Contract Object
Hello,
Is anyone aware, why we can not fetch RecordType.Name on 'Contract' object.
list<Contract> lstContract = [Select RecordType.Name From Contract where AccountId =: AccountId];
system.debug('===== lstContract: '+lstContract);
RecordTypeName is working good for another objects but for 'Contract' it is just giving the recordtype Id.
Please suggest.
Doing system.debug on an sobject does not shows the parent object values not sure when you say its working for other objects.
Try displaying the recordtype name and you'll see the value:
system.debug('\n\n: ' + lstContract[0].RecordType.Name);
All Answers
Doing system.debug on an sobject does not shows the parent object values not sure when you say its working for other objects.
Try displaying the recordtype name and you'll see the value:
system.debug('\n\n: ' + lstContract[0].RecordType.Name);
Ya ya correct.
I was doing some silly mistake.
Thank you very much !!