• vnmchat
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

I have the following in a helper class accessed by a Trigger that is run for every Opty given we are using custom Fiscal settings:

String fiscalYear = [SELECT PeriodId, Name from FiscalYearSettings where StartDate<=:curDateEval and EndDate>=:curDateEval].Name;

 

Which I would like to convert into something like:

List<Date> datesToInclude = new List<Date>();

List<...> fiscalYrs = [SELECT Name from FiscalYearSettings where StartDate<=: IN datesToInclude and EndDate>=: IN datesToInclude]

 

Adding the "IN" keyword for a in-between date comparison is not working...does someone know how to do this Query in one shot for all my Opty dates?