Custom metadata type Sobject not resolving 'Field_Relationship__r'

Issue #2106 duplicate
Jay Key created an issue

When use on Custom Metadata Sobject which has lookup on Object/Field Field_Relationship__r.QualifiedAPIName I got errors in IDE below. Please can you add to offline table this field and object relationship please?

Cannot resolve symbol 'Field_Relationship__r'

Cannot resolve symbol 'QualifiedAPIName'

https://help.salesforce.com/s/articleView?id=sf.custommetadatatypes_relationships.htm&type=5

Comments (6)

  1. Jay Key reporter

    for example it is failing on SOQL

    SELECT Id, Field_Relationship__r.QualifiedAPIName FROM Quality_Control_Question_Scoring__mdt

    where Quality_Control_Question_Scoring__mdt is defined as

    Offline table seems fine

  2. Scott Wells repo owner

    Hi. Unfortunately I'm not seeing the same behavior. For example, the apex-recipes project includes several related custom metadata types, and the following SOQL query works fine for me:

    SELECT
        Id,
        Picklist_Bucket__r.QualifiedApiName
    FROM Bucketed_Picklist_Value__mdt
    

    Here's a screenshot:

    Issue_2106.png

    Can you please a) confirm that you're using the most recent build of IC2; b) if you are and the same issue persists, please create a simple standalone project that reproduces this behavior and attach it here.

  3. Scott Wells repo owner

    Hi, Jay. Yes, there was a legitimate bug behind this, #2114, that was fixed in 2.2.2.2. Sorry I didn't circle back around and resolve this at the time as well.

  4. Log in to comment