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
hk7965hk7965 

FOR VIEW/REFERENCE can only be used on an object where viewing is tracked

Hi ,

Few of my test claases throwing error - Error: FOR VIEW/REFERENCE can only be used on an object where viewing is tracked ,  and this is causing my deployment fail. Could someone help to solve this issue?

Regards
Mohan
Best Answer chosen by hk7965
Sonam_SFDCSonam_SFDC
Can you confirm if the object where you are getting this error has a tab in Salesforce? I checked for a similar issue where the issue was resolved once a tab was created for that Object being using in the SOQL

All Answers

Sonam_SFDCSonam_SFDC
Can you confirm if the object where you are getting this error has a tab in Salesforce? I checked for a similar issue where the issue was resolved once a tab was created for that Object being using in the SOQL
This was selected as the best answer
hk7965hk7965
Hi sonam, We had a same issue.Someone Removed the Tab which is being used in SOQL, Adding the Tab back fixed the issue. Thanks.