2011-11-07 40 views
1

我試圖使用Salesforce API(使用自定義PatronManager對象)構建應用程序,並且當我運行以下「父對子」查詢時,我收到一條錯誤消息,指出關係是不明白:Salesforce中的關係SOQL PatronManager

SELECT Name, (SELECT PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r) FROM PatronTicket__TicketableEvent__c 

然而,當我改變這種並運行了「兒童與父母」查詢,它完美的作品:

SELECT PatronTicket__InstanceDate__c, PatronTicket__TicketableEvent__r.Name FROM PatronTicket__EventInstance__c 

任何人都可以揭示爲什麼家長對任何光線 - 小孩查詢給我一個錯誤信息?

謝謝!

斯科特

附加信息

我使用的是企業WSDL的PHP​​工具包和我得到了以下錯誤消息:

Fatal error: Uncaught SoapFault exception: [sf:INVALID_TYPE] INVALID_TYPE: PatronTicket__InstanceDate__c FROM PatronTicket__EventInstance__r)^ERROR at Row:1:Column:57 Didn't understand relationship 'PatronTicket__EventInstance__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. in /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php:782 Stack trace: #0 [internal function]: SoapClient->__call('query', Array) #1 /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php(782): SoapClient->query(Array) #2 /home/scott/public_html/salesforce-test/aupac-enterprise.php(16): SforceBaseClient->query('SELECT Name, (S...') #3 {main} thrown in /home/scott/public_html/salesforce-test/salesforce/soapclient/SforceBaseClient.php on line 782 

回答

1

這是米歇爾從贊助技術。你能直接聯繫我們的客戶服務部門嗎?使用PatronManager CRM幫助選項卡中的「支持」鏈接。這很棒,你正在努力做到這一點,我很樂意進一步討論。

我有一個簡單的「現在」的回答你(你需要使用PatronTicket_ EventInstances _r複數,而不是實例),但我也想談談這個更詳細,因爲技術上Salesforce的API沒有按」 t完全支持訪問自定義對象(因此我們的自定義對象不一定完全適用於API)...

相關問題