Question

Add Account Address through OData

I'm trying to use the API (OData) to create a new Account Address (AccountAddressCollection). - I am getting an error message "Server reported error: An error occurred while processing this request." with no other details. 

I am supplying values for the fields: AccountId, Address, AddressTypeId, CityId, CountryId, RegionId and Zip so I think that's everything..

I can create other types of records, such as the Account (AccountCollection), Items, Invoices, etc.

How can I get better details about what this error means? If I'm not supposed to create directly against the AccountAddressCollection, how can I create mutple addresses for an Account?

File attachments

Like

2 comments

Dear Aron,

Unfortunately, we are short of information regarding the request. As we understood, you are sendign a OData request from the C# project. Could you, please, share your C# project code, but close the creadentials to your instance, so we could test it on our side?

 

In further investigating I found a message in the logs such as "Cannot convert a primitive value to the expected type 'Edm.Guid'.".. I tracked the problem back to a mapping error, I was assigning a text value rather than a GUID to the AddressTypeId field. Thank you.

Show all comments