3

Whenever I try using a reasonable query:

SELECT Id, Name, LastTransferDate, LastActivityDate, 
       LastModifiedDate, CreatedDate, IsUnreadByOwner, OwnerId, Owner.Name 
  FROM Lead 

I get this error message:

INVALID_FIELD:
SELECT Id, Name, LastTransferDate, LastActivityDate
^
ERROR at Row:1:Column:18
No such column 'LastTransferDate' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

This is the API name for this field, at least according to the object definition - what am I doing wrong?

EDIT:

If this is not available from SOQL, what is the next best way to get access to this data?

2
  • Looking at the documentation salesforce.com/developer/docs/api/Content/…, I don't see a field called LastTransferData. Is it a custom field? Commented Feb 17, 2015 at 17:42
  • 1
    No - it appears in setup | customize | lead | standard fields - I suspect this is one of those sfdc convenience fields that are synthesized at runtime
    – cropredy
    Commented Feb 17, 2015 at 17:46

2 Answers 2

4

I don't know why, but by default this field was disabled on the field level security for default System Administrator profile. I checked the profile and enabled this field, after that the field is available via SOQL

enter image description here

1
  • 2
    Why on earth would SFDC do this!?!? That was the problem - it flat never occurred to me that SFDC would make ONE field on the Lead invisible using FLS to the System Administrator ... why?
    – user735
    Commented Feb 17, 2015 at 23:35
-1

Did you run this query in eclipse, I execute this query in Develper console, work bench and I ran into the same error you posted.

But when I tried this in eclipse I didn't get the error. Unfortunatly I did not have data to see the results.

2
  • this isn't really an answer
    – cropredy
    Commented Feb 17, 2015 at 18:29
  • I am not able to comment, So I wrote it as a answer. When I try to do a comment it is saying I need 50 Reputation.
    – Suresh
    Commented Feb 18, 2015 at 16:32

You must log in to answer this question.