You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebases the fix from PR apex-enterprise-patterns#137 against latest project structure and cleans up the couple of issues outlined on the prior PR comment thread (removes unused Exception and uses the SObjectType for the comparison vs. the String name)
lastSObjectType=tokenDescribe.getReferenceTo()[0]; //if it's polymorphic doesn't matter which one we get
110
+
if (token!=null&&i.hasNext() &&tokenDescribe.getSoapType() ==Schema.SoapType.ID) {
111
+
List<Schema.sObjectType> relatedObjs=tokenDescribe.getReferenceTo(); //if it's polymorphic, it matters which one we use - i.e. Lead.Owner is GROUP|USER and each has different fields.
112
+
113
+
if (relatedObjs.size() ==1||relatedSObjectType==null) {
114
+
lastSObjectType=relatedObjs[0]; //caller did not specify the one to use or there's only one so use the first one
115
+
}
116
+
else{
117
+
for (Schema.sObjectTypesot:relatedObjs) {
118
+
if (fflib_SObjectDescribe.getDescribe(sot).getDescribe().getSObjectType() ==relatedSObjectType) {
0 commit comments