function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
システム管理者 182システム管理者 182 

SOQLでLISTをバインド変数として使用した場合

Apex開発が初心者な為、的外れな質問を行っておりましたら申し訳ございません
複数LISTをバインド変数として利用した場合に
SOQLにて呼び出す条件が、範囲指定を行っている場合、
どのような条件で情報が取得されるのでしょうか?

    public Map<String , BdgCategory_DispInfo__c> qrBdgDispInfo(List<String> pBdgMidcd , List<Date> pDate ) {                   Map<String , BdgCategory_DispInfo__c> m = new Map<String , BdgCategory_DispInfo__c>();                  List<BdgCategory_DispInfo__c> rs =  [                       SELECT                   Id                  , KEY__c                 , Name                  , KI__c                  , S_Years__c                 , E_Years__c                 , Budget_Category_Large_Code__c                 , Budget_Category_Middle_Code__c                              FROM BdgCategory_DispInfo__c             WHERE Budget_Category_Middle_Code__c =: pBdgMidcd             AND   S_Years__c <=: pDate             AND   E_Years__c  >=: pDate         ];                  for (BdgCategory_DispInfo__c o : rs) {              // コードが空白の場合は、含めない             if (String.isNotBlank(o.Budget_Category_Middle_Code__c)) m.put(o.Budget_Category_Middle_Code__c, o);         }          return m;     }  
ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

Hope the below thread will help you to fix the issue.

https://developer.salesforce.com/forums/?id=9060G0000005MX3QAM

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri