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
uzaironbitzeruzaironbitzer 

LastActivityDate returns true

Hi,

 

I have a SoQL query which returns true (boolean value) in LastActivityDate rather than Date value. The query is as follows:

 

SELECT Id, LastActivityDate FROM Account

 

I expected to see the date of last activity for all the accounts in return but it contains boolean value in LastActivityDate. Am I looking through the wrong field?

Best Answer chosen by Admin (Salesforce Developers) 
uzaironbitzeruzaironbitzer

I guess I had to use LastModifiedDate instead of LastActivityDate

All Answers

sfdcfoxsfdcfox

In what context are you getting a boolean value? What language are you using? This field describes as a xsd:date value, so it definitely shouldn't return a boolean result.

uzaironbitzeruzaironbitzer

I'm using force.com API (toolkit) for php. Other date fields (like CreatedDate) return correct date values but LastActivityDate returns boolean.    

 

uzaironbitzeruzaironbitzer

I guess I had to use LastModifiedDate instead of LastActivityDate

This was selected as the best answer