AM trying to post customer invoice using freedom API.
But I got this error as per image below
"Object reference not set to an instance of an object."
AM trying to post customer invoice using freedom API.
But I got this error as per image below
"Object reference not set to an instance of an object."
Resolved, the problem was invalid TaxCode
Wonderful!
Thanks for the update, Ramadhan!
We are having the same issues, what was the tax code supposed to be?
Let me elaborate, we are trying to make a journal entry between 2 GL accounts, and we keep getting the following error.
Tax code should be based on your company setup tax codes
if your using json should be like this
{
"batch": {
"Transactions":[{
"Date":"/Date(1646863200000+0200)/",
"AccountCode":"Accounting Fees",
"Reference":"001",
"TransactionCode":"JNL",
"Debit":"500"
},{
"Date":"/Date(1646863200000+0200)/",
"AccountCode":"Accounting Fees",
"Reference":"001",
"TransactionCode":"JNL",
"Credit":"500"
}]
and if your using xml should be like this
<GLTransactionPost xmlns="">Freedom.PastelEvolution.co.za/.../25">
<batch xmlns:a="">schemas.datacontract.org/.../XMLSchema-instance">
<Hash i:nil="true" xmlns="">schemas.datacontract.org/.../>
<a:Transactions>
<a:GLTransactionPostDto>
<a:Date>2022-07-15T00:00:00</a:Date>
<a:Reference>XMLTest</a:Reference>
<a:TransactionCode>JNL</a:TransactionCode>
<a:AccountCode>Rent</a:AccountCode>
<a:Debit>222</a:Debit>
</a:GLTransactionPostDto>
<a:GLTransactionPostDto>
<a:Date>2022-07-15T00:00:00</a:Date>
<a:Reference>XMLTest</a:Reference>
<a:TransactionCode>JNL</a:TransactionCode>
<a:AccountCode>Current Account</a:AccountCode>
<a:Credit>222</a:Credit>
</a:GLTransactionPostDto>
</a:Transactions>
</batch>
</GLTransactionPost>
Thank you so much, that helped
Hello,
Am also getting the error above and have confirmed the Tax Code
Which sage version are you using? Kindly post full payload(schema) you're trying to post so that I can recreate. By the way date format is not correct. Correct your date first to be unix mil second
Am using Sage 200 Evolution V10.1.3.0005
Even after changing the date still getting the same error
Kindly use sample schema below
As per your example DocumentLine should be changed to lines, documentid is not required,lineid is not requried, warehouse is required
I added due date, but it's not required by default it will take order date/terms
I have done as per the screenshot shared above still getting the error.
I have not added unit code since my items are not unit of measure item.
What may I be missing from the screenshot below
On version 10 you should substitue "SalesOrder" with "quote" as shown on image below
Thanks so much for your assistance, Ramadhan!
You're welcome
@dennisDennis@254 Kindly confirm if it has been resolved
Thank you for your assistance it is working now
*Community Hub is the new name for Sage City