You need to sign in to do that
Don't have an account?
unikevin
Duplicate records
I am using Java toolkits for API6 . I try to get about 5,000 records via Sforce and it returns many duplicate records,but these records in the system are unique. it means the same record is returned several times..
anyone can help me? thanks.
the code below:
Code:
boolean keepLooping = true; while (keepLooping) { for (int i = 0; i < qr.getRecords().length; i++) { MessageElement[] records = qr.getRecords(i).get_any(); HashMap fields = new HashMap(); if (qr.getRecords(i).getId() != null) fields.put("Id", qr.getRecords(i).getId().getValue()); for (int j = 0; j < records.length; j++) { MessageElement record = records[j]; if (!fields.containsKey(record.getName())) fields.put(record.getName(), record.getValue()); } returnVal.add(fields); } if (qr.isDone()) keepLooping = false; else try { System.out.println("************QUERYMORE*********"); qr = binding.queryMore(qr.getQueryLocator()); } catch (UnexpectedErrorFault e) { e.printStackTrace(); } catch (InvalidQueryLocatorFault e) { e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); } }