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
cw.ax43cw.ax43 

How to validate if the field is visible?

The page of Field-Level Security for profile shows if fields are visible. My question is how we validate this field's visibility. API has isCreatable(), isFilterable(), isNillable() and isUpdateable() for Field.

Thanks for any of help.

SuperfellSuperfell
You have to look at the layout, see describeLayout
cw.ax43cw.ax43

I tried to call describeLayout("product") but got the exception of "sObject type 'Product' is not supported in describeLayout". Other types such as "account" and "contact" work fine.

Thanks.

SuperfellSuperfell
try product2, product is legacy and only there for backwards compat.