Announcements
Hi,
Sorry for submitting another question. I can't seem to reply to the other. I receive an error in both Chrome and Edge.
Further to previous enquiries, I have found a similar issue when creating a new entity that has a key that is effectively a foreign key to another entity type.
I have Vendors and Vendor Bank Accounts. The Vendor Bank Account has an ID and Vendor Number as keys. The Vendor Number determines the relationship between the two entities.
When I do a POST to create a Vendor Bank Account I provide the ID and Vendor Number in the body...
.../OData/Company('XXX')/Vendor_Bank_Account_Card
{
"Vendor Number": "10",
"ID": "1"
}
(Also tried "Vendor_Number")
However I receive a message...
The Vendor Bank Account already exists. Identification fields and values: Vendor Number='',ID='1'
The request doesn't seem to recognise the Vendor Number value.
Any assistance would be greatly appreciated as the issue is driving me crazy.
Hi, the primary key of table Vendor Bank Account (288) is Code and Vendor No..
It looks like you are publishing standard Vendor Bank Account Card (425) page into a WebService. When entering Code on this page, the Vendor Number is automatically Validated. But when you use Post externally, the code executed may not be correct. So I suggest you don't use the standard page, create a new Vendor Bank Account page, and then publish it to the Web Service
Hope this will help.
Thanks.
ZHU
Hello,
Thank you for asking. I have not seen the other post you mention, so apologies if I send you info you already know, but I think you are looking for "deep insert", for example like shown here www.kauffmann.nl/.../ .
If the linked record is blank, I think it may have to do with the page design, and a link property there, more than the API call itself. I don't know if this helps you?
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156