Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch PUTing entity with empty collection causes the rest of the batch to fail #22

Open
jegarne opened this issue Jul 25, 2017 · 1 comment

Comments

@jegarne
Copy link

jegarne commented Jul 25, 2017

I'm using batch PUT to update records (specifically ICRM Accounts) - I'm using the Addresses collection to handle Address updates. Occasionally an Account will not have any Addresses so all that gets sent back is an empty list. The desired behavior is that only the addresses in the list are updated, and if the list is empty nothing should happen. I've looked at the "Children List" section here and don't think these flags are necessary in this case: http://sage.github.io/SData-2.0/pages/core/0902/

What I'm seeing is that when SData processes the Account record with the empty Address property that record and all subsequent records in the batch fail with this error:

No row with the given identifier exists[Sage.SalesLogix.Entities.Address#a6UJ9A002G72].

The Address ID number is the same for each record. I have no idea where that id number is coming from - it does not exist in the Address table.

I'm assuming the solution is to NOT include the Addresses property when no Addresses are being updated, but at the same time that strikes me as strange behavior.

@jegarne
Copy link
Author

jegarne commented Jul 25, 2017

Ok, it was a data issue - the account record was referencing an address entity that no longer existed, so maybe the only relevant part here is that it caused the rest of the batch transaction to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant