You need to sign in to do that
Don't have an account?
TesterInSky
2. If the No.1 above can be confirmed, then I would like to know is this muti-referenctTo thing only relates to 'ens:User'? I mean is it correct if I set the type for all fields who have more than one 'referenceTo' node derectly to 'ens:Name'?
What type should be if there are more then one 'referenceTo' returned in 'describeSObjects' call
When calling 'describeSObjects' in Java to get the sObject fields information to form the concrete schema on local, I noticed that the type returned as 'referenceTo' for some sObjects may have more than one 'referenceTo' node. Thus I was confused how could I set referece type for such kind of fields.
my question is:
1. Base on my analysis, I noticed that there are many fields may have more then one 'referenceTo', please confirm me whether I was right.
my question is:
1. Base on my analysis, I noticed that there are many fields may have more then one 'referenceTo', please confirm me whether I was right.
take the sObject 'ActivityHistory' for example, there is a field named 'What' with the type of 'ens:Name', but in the soap message there are more than one 'referenceTo' node including the 'ens:Asset' among these 'referenceTo' nodes, which you may noticed that it is neither a 'ens:User' nor a 'ens:Group'. I also saw some other sObject names (the field 'Who' in 'ActivityHistory' is set to 'ens:Name' as its type, but with more than one reference To including 'ens:Contact' ) appeared in this 'referenceTo'.
2. If the No.1 above can be confirmed, then I would like to know is this muti-referenctTo thing only relates to 'ens:User'? I mean is it correct if I set the type for all fields who have more than one 'referenceTo' node derectly to 'ens:Name'?
Thanks
the relationship for these fields are modled as pointing to the name entity (see the namePointing flag in the describe docs), when you run SOQL-R queries against these relationships, you can only query fields from the name entity.
Sorry, i don't follow your 2nd question at all. User has nothing to do with it (other than lots of relationships point to User). I don't know what you mean by setting the type to Name, whether you use Name, or you use some concrete type depends on exactly what you're trying to do.
In my own code, when creating the element 'CreatedBy' and trying to set value for its 'type' attribute, what I got from the describeSObjects call is that there are more than one item in the 'referenceTo' array with 'User' and 'Group' in it. So I do not know what value should I set to this 'type' attribute. Is there a way to fix this?
Why don't you just use the enterprise API?, it sounds like you're just rebuilding it from the partner API.