API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

ValidationException(E04010): The document may not be null


Im rewriting our connection to Economic, using token-based solution in .NET.

I'm getting this error when trying to create a orderLine:


Economic.Api.Exceptions.ValidationException(E04010): The document may not be null. (id=21922a75-9977-4437-8517-3c1542e4fcfe)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ServiceModel.FaultException: Economic.Api.Exceptions.ValidationException(E04010): The document may not be null. (id=21922a75-9977-4437-8517-3c1542e4fcfe)


My Code:

 public bool SaveOrderLine(int orderNumber, string strProductNumber, decimal decQuantity, decimal decPrice)
      bool rtnValue = false;
      OrderHandle objOrder = _session.Order_FindByNumber(orderNumber);
      OrderLineHandle objLineData = _session.OrderLine_Create(objOrder);


We didn't check for a document attribute in our previous solution, and niether can i find anything about this in the documentation 


Can anybody explain to me what i should do to fix this?

closed with the note: Solved through other channels.
created Sep 8, 2016 by Jacob91
0% Accept Rate

closed Sep 13, 2016 by olej
Q 1 A 1 C 0
Solved via API support mail. Issues stemmed from rewriting the solution from .net SDK to using pure SOAP.
General tip: Where SDK uses Entity.Method the SOAP methods are Entity_Method.

1 Answer

It seems the objOrder is Null.. Although its the same solution as pre-token, there seems to be some difference in how the data received after a call..
answered Sep 12, 2016 by Jacob91
Visma e-conomic A/S