Skip to main content
added 11 characters in body
Source Link
Vijay Ganji
  • 6.7k
  • 3
  • 15
  • 31

You candirectlycan directly query it like: List opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];

List<Opportunity> opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY 
where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];

No need to declare variable and its value fisrtfirst,

You candirectly query it like: List opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];

No need to declare variable and its value fisrt,

You can directly query it like:

List<Opportunity> opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY 
where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];

No need to declare variable and its value first,

Source Link

You candirectly query it like: List opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];

No need to declare variable and its value fisrt,