function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Edwin VijayEdwin Vijay 

Cannot find symbol getField

Here is the error message.

 

Cannot find symbol

 

symbol : method getField(java.lang.String)
location: class com.sforce.soap.partner.sobject.SObject

 

 

I used the getId() method and the code works, only when i use getField the code doesn't.... Any pointers appreciated

colemabcolemab

The Partner WSDL jar file's Sobject extends extends XmlObject and the getfield function is actually in the extends XmlObject class.

 

You *may* need to do this import:

import com.sforce.ws.bind.XmlObject;

 

Hope this helps.