You need to sign in to do that
Don't have an account?
Losintikfos
Message Edited by Losintikfos on 10-01-2008 05:59 AM
ClassCastException
Hi Experts,
Do anyone knows why i am getting ClassCastException from below code?
com.sforce.soap.enterprise.sobject.impl.SObjectImpl cannot be cast to com.sforce.soap.enterprise.sobject.AccountDo anyone knows why i am getting ClassCastException from below code?
Code:
sObjects[] = queryResult.getRecordsArray(); for (int j = 0; j < sObjects.length; j++) { Account obj = (Account) sObjects[j]; String id = obj.getId(); }
Message Edited by Losintikfos on 10-01-2008 05:59 AM
All Answers
Doing something like this;
It's the once i have deployed to the web service server which pops up with the exception.
Do anyone know why i can't cast Account to SObject in webservice?
Doing something like this: Account obj = (Account) sObjects[j] and keeps getting ClassCastException - seem everyline of the code if fine apart from this cast.
Experts advice pls.
Message Edited by Losintikfos on 10-02-2008 01:11 AM