EntityDefinition.QualifiedApiName on FieldDefinition in SOQL is marked as invalid

Issue #1760 resolved
Attila Hajdrik created an issue

Having this query:

        FieldDefinition[] fdList = [SELECT QualifiedApiName
                                    , RelationshipName
                                    , DurableId
                                    , EntityDefinitionId
                                    , EntityDefinition.QualifiedApiName
                                FROM  FieldDefinition  
                                WHERE DurableId IN : durableIdSet
                                ];

EntityDefinition and its property shows as red in the editors (code and soql query as well)

Also after query on the fdList[0] item shows as unknown.

Comments (5)

  1. Scott Wells repo owner

    Interesting. It appears that the Salesforce APIs are reporting some relationship fields as being of type STRING instead of REFERENCE. I'm testing a fix for that now. Assuming it all bears out well, I'll include it in the next build, currently targeted for tomorrow morning.

  2. Attila Hajdrik reporter

    Thanks Scott, I found a somewhat related issue that was solved before just in this case only SalesForce defined objects were involved and no custom metadata, that’s why I opened it.

  3. Scott Wells repo owner

    Yep, that fixes it, and the problem affects about a dozen or so standard SObjects. I'll let Salesforce know about this inconsistency in their API results, but in the next build of IC2 the OST will accommodate for it. You will need to regenerate your OST after updating, minimally the SObjects portion.

  4. Log in to comment