So I've got SData installed and working. I can ping AR_Customer to get a list of customers. However, attempting to post to this endpoint with the following body fails:
Of note, I've slimmed down the payload to only what is known to be the simplest required fields.
<?xml version="1.0" ?>
<entry
<id/>
<title/>
<content/>
<sdata:payload>
<AR_Customer> <!--sdata:uri="">launchsage100.fulcrumpro.com:443/.../AR_Customer('00;KCUSTOM')" xmlns=""> -->
<ARDivisionNo>00</ARDivisionNo>
<CustomerNo>KCUSTOM</CustomerNo>
<CustomerName>This is a freshly created customer</CustomerName>
<SalespersonDivisionNo>00</SalespersonDivisionNo>
<SalespersonNo>SLE1</SalespersonNo>
</AR_Customer>
</sdata:payload>
</entry>
Response:
<?xml version="1.0" encoding="utf-8"?>
<sdata:diagnoses xmlns="">schemas.sage.com/.../1" xmlns:xs="">www.w3.org/.../XMLSchema" xmlns:atom="">http://www.w3.org/2005/Atom" xmlns:sdata="">schemas.sage.com/.../1" xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xmlns:opensearch="">a9.com/.../" xmlns:sync="">schemas.sage.com/.../1" xmlns:sme="">schemas.sage.com/.../2007" xmlns:http="">schemas.sage.com/.../1">
<sdata:diagnosis>
<sdata:severity>error</sdata:severity>
<sdata:sdataCode>ApplicationDiagnosis</sdata:sdataCode>
<sdata:applicationCode xsi:nil="true" />
<sdata:message>Exception caught during the processing of a message
Verb: POST
<sdata:stackTrace>System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Sage.Utilities.Collections.MarshalByRefList`1.get_Item(Int32 index)
at Sage.MAS.SData.SqlRequestHandler`1.GetEntryFromStream(FeedSerializer feedSerializer, Stream stream)
at Sage.MAS.SData.MAS90Adapter.PvxAdapter.ExecuteOperation(OperationType eOperType, IRequest request, RequestContext requestContext, IRequestHandler requestHandler, FeedEntry& aFeedEntry)
at Sage.MAS.SData.MAS90Adapter.CMAS90Adapter.HandlePostRequest(IRequest request, RequestContext requestContext, IRequestHandler requestHandler)
at Sage.FR.SData.Adapter.HandleRequest(IRequest request)</sdata:stackTrace>
<sdata:payloadPath />
</sdata:diagnosis>
</sdata:diagnoses>
Any ideas on how to go about creating customers via SData? Or, if not possible, where I can get some good documentation regarding working with SData or BOI?