Loading

Use LastReferencedDate and LastViewedDate fields in a SOQL query

Publiceringsdatum: Oct 13, 2022
Beskrivning

If you use the LastReferencedDate or LastViewedDate in a query on a custom object, you may receive this error message 

INVALID_FIELD: 
select id, LastViewedDate from my_custom__c
^
ERROR at Row:1:Column:12
No such column 'LastViewedDate' on entity 'my_custom__c'. 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.
Lösning
To resolve this issue, create a custom tab for the custom object. 
The fields LastReferencedDate and LastViewedDate are stored as part of the tab, and do not exist for the object until a tab is created. 
Knowledge-artikelnummer

000382652

 
Laddar
Salesforce Help | Article