Lightning Component Code Examples
Client
Application
Dimensions
Attributes
Record Object Examples
Parameters
Version
Links
Organization
User
Controller
SignedRequest
Canvas Limits
Previous Versions
These code examples demonstrate how the Record object contains different information depending on whether your canvas app appears in the publisher or the feed.
If your canvas app appears in the publisher, the Record object contains different information depending on whether the publisher appears on a user record, a group record, or an object record.
The Record object Id is the User.Id and the Type is User.
1"record":{
2 "attributes":{
3 "type":"User",
4 "url":"/services/data/v68.0/sobjects/User/001xx000003DGWiABC"
5 },
6 "Id":"001xx000003DGWiABC"
7 }The Record object Id is the CollaborationGroup.Id and the Type is CollaborationGroup.
1"record":{
2 "attributes":{
3 "type":"CollaborationGroup",
4 "url":"/services/data/v68.0/sobjects/CollaborationGroup/001xx000003DGWiXYZ"
5 },
6 "Id":"001xx000003DGWiXYZ"
7 }The Record object Id is the object Id and the Type is the object name, for example, Account.
1"record":{
2 "attributes":{
3 "type":"Account",
4 "url":"/services/data/v68.0/sobjects/Account/001xx000003DGWiAAO"
5 },
6 "Id":"001xx000003DGWiAAO"
7 }If your canvas app appears in the feed, the Record object always contains the feed item information whether the feed is on a user record, a group record, or an object record.
The Record object Id is the FeedItem.Id and the Type is FeedItem.
1"reoord":{
2 "attributes":{
3 "type":"FeedItem",
4 "url":"/services/data/v68.0/sobjects/FeedItem/001xx000003DGWiAAO"
5 },
6 "Id":"001xx000003DGWiAAO"
7 }