Object Reference for the Salesforce Platform
Newer Version Available
RecordVisibility (Pilot)
Supported Calls
describeSObjects(), query()
Special Access Rules
To access this object, you need a CRM Analytics license or to contact Salesforce to participate in the pilot program. You must also have the “View All Data” or “Enable RecordVisibility API” user permission.
We provide the RecordVisibility object to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. The RecordVisibility object isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for the RecordVisibility object in the group in the Trailblazer Community.
Note
Fields
| Field Name | Details |
|---|---|
| RecordId |
|
| VisibilityAttribute |
|
Usage
Use this object to query the attributes that determine the visibility of one or more records. You can’t create, delete, or update any records using this object.
Up to 200 record IDs can be queried. You can include an ORDER BY clause for any field that is being selected in the query.
This sample query returns the visibility attributes for the indicated record.
1SELECT RecordId, VisibilityAttribute
2FROM RecordVisibility
3WHERE RecordId=[single ID] // or Record IN [list of IDs]The RecordId and VisibilityAttribute fields must be a part of the fields that are being selected despite RecordId being used in the filter criteria as well.
RecordVisibility is a foreign key on the records. This query returns the visibility attributes for Account records:
1SELECT Id, Name, RecordVisibility.VisibilityAttribute
2FROM AccountYou can’t filter RecordId fields when using RecordVisibility as a lookup or foreign key.
You can use RecordVisibilityContext to filter WITH clauses in queries. For more information, see WITH filteringExpression in the SOQL and SOSL Reference.