0
0

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 1 year has passed since last update.

開発系のまとめ

Last updated at Posted at 2021-10-17

まとめページに戻る

Apex

myMap.keySet()
myMap.values()

for(Target__c target : mapTargets.values()) {

for (OpportunityContactRole oppCR : opp.OpportunityContactRoles){
   if (oppCR.IsPrimary){
      IsPrimary = true;
      bewak;                        
   }//end of if
}//end of for
// Listの場合

List<Account> accList = [Select Id From Account];


// Setの場合

// これはコンパイルエラー
Set<Account> accSet = [Select Id From Account];

// コンストラクタにSOQL結果のListを渡すとうまくいく
Set<Account> accSet 
  = new Set<Account>([Select Id From Account]);


// Mapの場合

// これはコンパイルエラー
Map<Id, Account> accMap = [Select Id From Account];

// コンストラクタにSOQL結果のListを渡すとうまくいく
Map<Id, Account> accMap 
  = new Map<Id, Account>([Select Id From Account]);

SOQLでのコレクションとバインド変数の使用方法

JavaScript

全般

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?