Salesforce 附加 __r 错误(加入 3 个表)
Salesforce append __r error (join 3 tables)
我有三个表:
Opportunity_Buy__c,
Campaign__c,
Internal_Line_Item__c
我正在尝试加入他们的 salesforce。关系(加入)将是:
Opportunity_Buy__c.AAAAA = Campaign__r.AAAAA,
Internal_Line_Item__r.OpportunityBuy__c = Opportunity_Buy__c.id
我的脚本如下:
SELECT
Media_Code__c,
Special_Product__c,
Buy_Type__c,
Start_Date__c,
End_Date__c,
Gross_Cost__c,
Rate__c,
(SELECT Partner_Name__c, AppNexus_IO__c, Goal__c, Goal_Details__c, Gross_CPM__c, GROSS_COST2__c, Name FROM Internal_Line_Item__r),
(SELECT AAAAA FROM Campaign__r)
FROM Opportunity_Buy__c
WHERE AAAAA IN (SELECT AAAAA FROM Campaign__r)
AND id IN (SELECT OpportunityBuy__c FROM Internal_Line_Item__r)
我收到一个错误:
Didn't understand relationship 'Internal_Line_Item__r' in FROM part of query call.
我不明白哪里出了问题。我正在尝试这个,但我仍然收到错误消息:
SELECT
Media_Code__c,
Start_Date__c,
End_Date__c,
(SELECT Partner_Name__c, Name FROM Internal_Line_Item__r)
FROM Opportunity_Buy__c
请阅读 this documentation Salesforce 中的关系查询。
This article正是您所需要的。
你需要替换这部分的Internal_Line_Item__r
和Campaign__r
(SELECT Partner_Name__c, AppNexus_IO__c, Goal__c, Goal_Details__c, Gross_CPM__c, GROSS_COST2__c, Name FROM Internal_Line_Item__r),
(SELECT AAAAA FROM Campaign__r)
FROM Opportunity_Buy__c
与你在 Child Relationship Name
中所拥有的这些关系。
编辑================>>
如何找到管理界面:
- Classis 界面:
- 闪电接口:
因此,在 Salesforce 中,您不能直接从 SOQL 创建对象(表)。您必须使用 Web 用户界面来处理自定义对象(表格)和自定义字段(列)的创建
我还找到了一篇很好的文章,可以帮助 here
我有三个表:
Opportunity_Buy__c,
Campaign__c,
Internal_Line_Item__c
我正在尝试加入他们的 salesforce。关系(加入)将是:
Opportunity_Buy__c.AAAAA = Campaign__r.AAAAA,
Internal_Line_Item__r.OpportunityBuy__c = Opportunity_Buy__c.id
我的脚本如下:
SELECT
Media_Code__c,
Special_Product__c,
Buy_Type__c,
Start_Date__c,
End_Date__c,
Gross_Cost__c,
Rate__c,
(SELECT Partner_Name__c, AppNexus_IO__c, Goal__c, Goal_Details__c, Gross_CPM__c, GROSS_COST2__c, Name FROM Internal_Line_Item__r),
(SELECT AAAAA FROM Campaign__r)
FROM Opportunity_Buy__c
WHERE AAAAA IN (SELECT AAAAA FROM Campaign__r)
AND id IN (SELECT OpportunityBuy__c FROM Internal_Line_Item__r)
我收到一个错误:
Didn't understand relationship 'Internal_Line_Item__r' in FROM part of query call.
我不明白哪里出了问题。我正在尝试这个,但我仍然收到错误消息:
SELECT
Media_Code__c,
Start_Date__c,
End_Date__c,
(SELECT Partner_Name__c, Name FROM Internal_Line_Item__r)
FROM Opportunity_Buy__c
请阅读 this documentation Salesforce 中的关系查询。
This article正是您所需要的。
你需要替换这部分的Internal_Line_Item__r
和Campaign__r
(SELECT Partner_Name__c, AppNexus_IO__c, Goal__c, Goal_Details__c, Gross_CPM__c, GROSS_COST2__c, Name FROM Internal_Line_Item__r),
(SELECT AAAAA FROM Campaign__r)
FROM Opportunity_Buy__c
与你在 Child Relationship Name
中所拥有的这些关系。
编辑================>>
如何找到管理界面:
- Classis 界面:
- 闪电接口:
因此,在 Salesforce 中,您不能直接从 SOQL 创建对象(表)。您必须使用 Web 用户界面来处理自定义对象(表格)和自定义字段(列)的创建
我还找到了一篇很好的文章,可以帮助 here