You need to sign in to do that
Don't have an account?
Matthias Guenther
In lightning how do I get to a components RecordType.Developername?
I have a controller that get a record:
It works fine and gets the information, but I cannot figure out how to get to RecordType.Developername in lightning.
Current o.Id: 0060L00000VyqTYQAZ
Current o.RecordType.Developername: undefined
I could get just the recordtype Id and make another call to get the developer name, but that seems to be an avoidable step. I did not find anything about this in the documentation or searching.
@AuraEnabled public static Opportunity getOpp(Id oppId) { return [SELECT Id, Name, RecordType.Developername FROM Opportunity WHERE Id = :oppId]; }
It works fine and gets the information, but I cannot figure out how to get to RecordType.Developername in lightning.
var o = response.getReturnValue(); console.log('Current o: ' + o); console.log('Current o.Id: ' + o.Id); console.log('Current o.RecordType.Developername: ' + o.RecordType.Developername);Current o: [object Object]
Current o.Id: 0060L00000VyqTYQAZ
Current o.RecordType.Developername: undefined
I could get just the recordtype Id and make another call to get the developer name, but that seems to be an avoidable step. I did not find anything about this in the documentation or searching.
All Answers