[英]How to access a lookup field through SOQL in salesforce?
3 Standard Objects: A, B, C 3个标准物体:A,B,C
How to access f3 field value through Object A? 如何通过对象A访问f3字段值?
Assuming A, B and C are standard objects, and f1, f2, f3 are standard fields; 假设A,B和C是标准对象,而f1,f2,f3是标准字段; and all of them are API names, your SOQL query would look something like:
并且所有这些都是API名称,您的SOQL查询将类似于:
SELECT f1.f2.f3 FROM A
If A, B and C are custom objects, and f1, f2 and f3 are custom fields; 如果A,B和C是自定义对象,而f1,f2和f3是自定义字段; and again all of them are API names, it would look like:
而且它们都是API名称,看起来像:
SELECT f1__r.f2__r.f3__c FROM A__c
Also remember to add some kind of WHERE
or LIMIT
clause to avoid hitting governor limits . 还要记住要添加某种
WHERE
或LIMIT
子句,以免达到调节器限制 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.