Newer Version Available

This content describes an older version of this product. View Latest

RecordDetails Class

Access information about records in your organization.

Namespace

ConnectApi

RecordDetails Methods

The following are methods for RecordDetails. All methods are static.

getRecentRecords(String, String)

Returns a list of objects that contain summary information about records recently added, edited, or viewed by the context user.

API Version

30.0

Requires Chatter

No

Signature

public static ConnectApi.RecordSummaryList getRecentRecords(String communityId, String userId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
userId
Type: String
The ID for the context user or the keyword me.

Return Value

Type: ConnectApi.RecordSummaryList

An object that contains a list of record objects. The records can be of any type in the organization, including custom objects. The record objects are summary objects, not detail objects.

getRecentRecords(String, String, Integer)

Returns an object that contains a list populated by the specified number of objects. Each object contains summary information about a record recently added, edited, or viewed by the context user.

API Version

30.0

Requires Chatter

No

Signature

public static ConnectApi.RecordSummaryList getRecentRecords(String communityId, String userId, Integer size)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
userId
Type: String
The ID for the context user or the keyword me.
size
Type: Integer
The maximum number of recently used objects to return between 1–150. The default value is 10.

Return Value

Type: ConnectApi.RecordSummaryList

An object that contains a list of record objects. The records can be of any type in the organization, including custom objects. The record objects are summary objects, not detail objects.

getRecordView(String, String)

Returns a RecordView object, which contains a combined view of layout information (metadata) and data for the specified record.
Available in: Unlimited, Enterprise, and Developer Editions

API Version

30.0

Requires Chatter

No

Signature

public static ConnectApi.RecordView getRecordView(String communityId, String recordId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
recordId
Type: String
The ID of a record.

Return Value

Type: ConnectApi.​RecordView

A view of any record in the organization, including a custom object record. This object is used if a specialized object, such as User or ChatterGroup, is not available for the record type.

Usage

This method uses a whitelist to determine whether to return information about a record. If the object type in the recordId argument is not in the whitelist, the call returns the error "ConnectApi.ConnectApiException: Object type not supported". These are the supported objects:
Object Type Available
Custom objects 30.0
Account 30.0
Campaign 30.0
Case 30.0
CollaborationGroup 30.0
Contact 30.0
ContentDocument 30.0
ContentVersion 30.0
Contract 30.0
Dashboard 30.0
Event 30.0
Lead 30.0
LiveChatTranscript 30.0
Opportunity 30.0
OpportunityLineItem 30.0
Product 30.0
ServiceContract 30.0
Solution 30.0
Task 30.0
User 30.0