Wrong OST for FieldDefinition in Tooling API

Issue #2628 open
Adam Stepanek created an issue

Hi Scott,

this query does not know of the relationship from FieldDefinition to EntityDefinition, like mentioned here in documentation.

A relationship lookup to the object type that contains this field. For example, if the field is defined on an account, the lookup is to Account. You can’t interact directly with this field. Instead, use it in queries.

  1. SELECT Entity​Definition.​Label FROM Field​Definition WHERE Entity​Definition.​QualifiedApi​Name='Lead'
SELECT
    Length,
    Precision,
    QualifiedApiName,
    Scale,
    ValueTypeId
FROM FieldDefinition
WHERE EntityDefinition.QualifiedApiName = 'ProductTranslation__mdt'

Comments (2)

  1. Scott Wells repo owner
    • changed status to open

    Interesting. It looks like the relationships aren't reported quite correctly for the Tooling API SObjects. Easy enough to fix, but it won't be for this week's build as it's ready to go already. Shouldn't be an issue adding it to next week's build, though.

  2. Log in to comment