You need to sign in to do that
Don't have an account?

using java retrieve
Im not sure how to create the "Account" object in this sample code.
Java gives me an error on the instantiation on the object called "Account".
private void retrieveSample() { try { // Invoke the retrieve call and save results in an array of SObjects SObject[] sObjects = binding.retrieve("Id, AccountNumber, Name, Website", "Account", new ID[] {new ID("001x0000002kuk1AAA"), new ID("001x0000002khE0AAI")}); // Verify that some objects were returned. // Even though we began with valid object IDs, // someone else might have deleted them in the meantime. if (sObjects != null) { // Loop through the array and print out some properties for (int i=0;i<sObjects.length;i++) { // Cast the SObject into an Account object Account retrievedAccount = (Account)sObjects[i]; System.out.println("Account: " + retrievedAccount.getId()); System.out.println(" AccountNumber = " + retrievedAccount.getAccountNumber()); System.out.println(" Name = " + retrievedAccount.getName()); System.out.println(" Website = " + retrievedAccount.getWebsite()); } } } catch (Exception ex) { System.out.println("An unexpected error has occurred." + ex.getMessage()); } }
Do I need to import that object from a particular jar file?
Should I try making an SObject or a generic java Object?
Decided to just pass an array of strings into a select.