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
kmadminkmadmin 

UpsertResult is null

I am using Upsert call for contacts. There are around 1800 contacts in my database table. However, upsert call inserts/updates around 1600 of them and the rest are coming back as null. When I take a look at the input data, I don't see anything wrong. Also there are no errors thrown by the API.

 

Under what circumstances would UpsertResult object in UpsertResult object array would be set to null?

AlwaysConfusedAlwaysConfused

I had this before.

 

I think (if i rmember correctly) it was something to do with batch sizes.

 

If you run a "query" call you can query up to 2,000 records per batch, however to make the solution reliable I have only been able to upsert / insert batches of up to 100 records at a time.

 

The API seems to timeout with the server providing literally no response at all, like the connection is dropped and you get no feedback.

 

try dropping you batch sizes, send say 50 records to the server and see what you get, or better still for testing try sending just a single record at a time.

 

It's an odd one this, as you would expect a timeout exception.

Sridhar BonagiriSridhar Bonagiri

Hi,

Can you check out whethere you are getting any API timeout error while upserting?

 

Kelly KKelly K
I just had a similar issue where the whole batch ended up failing. Lowering the batch size helped me isolate the records that were causing the batches to fail. Ended up being a casing query issue (something not obvious) where I was copying an email from a text field and placing it into an email field and then later querying in another method.