You need to sign in to do that
Don't have an account?
unikevin
About QueryResult
hi,
I am using get_any() to get the field's value,but I find when the field's value is empty, it will not in the SObject.get_any().
Is there any other way that I can get all the fields' value even though they are empty, so I can get the value like "Sobject.get('FieldName')" ?
I am using get_any() to get the field's value,but I find when the field's value is empty, it will not in the SObject.get_any().
Is there any other way that I can get all the fields' value even though they are empty, so I can get the value like "Sobject.get('FieldName')" ?
You either going to have to code around the axis bugs, or switch to a later axis version (but this is not as straightforward as it might be, see http://blog.sforce.com/sforce/2005/06/migrating_from_.html
I am using SForce Partner API 6 for JAVA.
eg:
======================================
String query = "select Name,status__c,news_body__c,image_url__c,OwnerId from announcement__c where Id = 'XXXXXX'";
QueryResult qr = null;
qr = client.query(query);
if (qr.getSize() != 0) {
SObject sobj = qr.getRecords()[0];
MessageElement[] ms = sobj.get_any();
for (int c = 0; c < ms.length; c++) {
out.print("
Name:" + c+"."+ms[c].getName());
}
======================================
It only returns 4 items :
Name:0.Name
Name:1.news_body__c
Name:2.image_url__c
Name:3.OwnerId
the Status__c is not in the sobj.get_any(), is there any way to get Status__c , even though it's empty or null?
thanks!
Message Edited by unikevin on 12-29-2005 10:26 PM