• Yogendra Rishishwar
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I want to retrieve CompanyName of a Case Owner . I am using below query but not working .
Select c.Owner.Email, c.Owner.CompanyName, c.Owner.Name,   c.ClosedDate, c.CaseNumber From Case c where c.CaseNumber='1002'
if i remove c.Owner.CompanyName from query then it is working fine.

So  how can i retrieve Company name of case Owner along with CaseNumber and case ClosedDate in a single Query.
How to get current Date time in Salesforce Object Query Language .
Suppose I want to get all cases which have been closed in last 30 days then what should be query .

Select CaseNumber from Case where ClosedDate >= CURRENT_DATE - 30 Days ;
 
What date function will return cirrent date in SOQL?

Thanks
Yogendra Rishishwar
 
If I am using below Query
SELECT CaseNumber from Case where  ClosedDate > LAST_N_DAYS:31

To get all case numbers  which have been closed within last 30 days , It is not giving any result , even though Some cases exist in Database closed within the 30 days.

I could not understand , why I am not getting correct result.
Thanks
Yogendra Rishishwar
 
How to get current Date time in Salesforce Object Query Language .
Suppose I want to get all cases which have been closed in last 30 days then what should be query .

Select CaseNumber from Case where ClosedDate >= CURRENT_DATE - 30 Days ;
 
What date function will return cirrent date in SOQL?

Thanks
Yogendra Rishishwar
 
If I am using below Query
SELECT CaseNumber from Case where  ClosedDate > LAST_N_DAYS:31

To get all case numbers  which have been closed within last 30 days , It is not giving any result , even though Some cases exist in Database closed within the 30 days.

I could not understand , why I am not getting correct result.
Thanks
Yogendra Rishishwar