1

I am using remoting on VF page. Here is the code snippet.

<apex:remoteObjects >
    <apex:remoteObjectModel jsShortHand="sfNode" name="SBQQ__QuoteLine__c" fields="Id,Name,SBQQ__Quote__c,SBQQ__Quote__r.Name,SBQQ__ListPrice__c,SBQQ__Quantity__c">
        <apex:remoteObjectField name="SBQQ__RequiredBy__c" jsShorthand="Parent" />
    </apex:remoteObjectModel>
</apex:remoteObjects>

The above piece of code throws an error that "SBQQ__Quote__r.Name" such relation doesn't exist. But when I do a query in workbench it works.

2

The documentation doesn't state any particular limitation, but it appears that you cannot query parent or child records. Instead, you'll need to retrieve them separately:

<apex:remoteObjects >
    <apex:remoteObjectModel name="SBQQ__QuoteLine__c" fields="Id,Name,SBQQ__Quote__c,SBQQ__RequiredBy__c,SBQQ__ListPrice__c,SBQQ__Quantity__c">
    <apex:remoteObjectModel name="SBQQ__Quote__c" fields="Id,Name" />
</apex:remoteObjects>

At that point, you'll need the query the quote lines, and then query the quote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.