I have a contact Trigger and I'm trying to get the value of the Type picklist on Account for each Contact that the trigger is working on.
So far I've got this:
Id cusAccRTs = [SELECT id from RecordType where Name = 'Customer' and SobjectType = 'Account' LIMIT 1].Id;
This gets me the RecordTypeId so I can use that for comparisons. But how can I get the value from the Account attached to the contact in a After trigger context?
c.Account.RecordTypeId == cusAccRTs && (c.Account.Type == 'Prospect' || c.Account.Type == 'Customer')
Setting system.debug on these values gets me
null , so I guess I'll have to query for them into a Map first. Any pointers to help me with this?