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
Anupam Bansal (Capgemini)Anupam Bansal (Capgemini) 

DataCategoryName Field not visible in Apex Class


I am facing a strange issue. When I try to use the query "SELECT id,DataCategoryName FROM Community" in an Apex Class, it fails compilation with error - The field DataCategoryname is not found on Community object, However, when I run the same query in Dev console, it runs fine and brings back the results.Please help

Anupam Bansal