You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How can I reliably identify foreign key fields and related objects with the REST API metadata

Accepted answer
52
Views
6
Comments
in Sales 6 comments

Summary:

I'm trying to reliably identify foreign-key fields and lookup fields from the REST 'describe' object metadata.

Content (required):

It appears I can find FCL and DCL fields with the "controlType" attribute in the metadata, but I'm not confident about the reliability of that because it describes the presentation of the field, not necessarily the data the field represents.

The more promising option appears to be the lov.childRef in the metadata, where a value starting with "FK_LOVVA_..." represents DCL, and a value starting with "LOVVA_..." seems to indicate FCL. That also isn't particularly satisfying because it involves parsing into a name that does not seem to be a canonical way of differentiating the type of field (relationship, DCL, or FCL). It also appears that FK_LOVVA and LOVVA_ are only used for AppComposer custom relationships, not for native relationships.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!