0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Apex の Mapの使い方

Last updated at Posted at 2021-09-17

すぐに忘れるので、記録しておきます。

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の書き方

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?