すぐに忘れるので、記録しておきます。
Map<Id, Account> mapAccount = new Map<Id, Account>([SELECT Id, Name FROM Account WHERE Id=:Trigger.New[0].AccountId]);
for(Contact cont: Trigger.new){
if(cont.Id != null && mapAccount.containsKey(cont.AccountId)){
t.AccountName__c = mapAccount.get(cont.AccountId).Name;
}
}
Hola a todo el mundo! Necesitaría asesoramiento personal sobre una pequeña prueba de salesforce
#関連情報
効率的なSOQLの書き方