Rank: Member
Groups: Registered
Joined: 8/29/2024(UTC) Posts: 14 Thanks: 3 times
|
Hi,
The last time I worked with the CenterPoint API was a couple months ago. I am trying to test syncing an A/R invoice into the system. I am using the same payload that worked a few months ago but I am getting the following error:
Invalid Request DatabaseError: Cannot insert the value NULL into column 'OpenPeriodId', table 'BusinessSample1.dbo.UnpostedTransactions'; column does not allow nulls. INSERT fails. The statement has been terminated.
My guess is that I need to be changing the accounting period somehow?
Thanks
|
|
|
|
Rank: Administration
Groups: Administrators, Moderator, Registered Joined: 2/28/2018(UTC) Posts: 53 Location: Red Wing, MN
Was thanked: 4 time(s) in 4 post(s)
|
The Invoice Date will determine the Period you are trying to post to. It's possible that the period for the date you used previously is now closed and not allowing any transaction data to be posted.
|
1 user thanked aarony for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/28/2018(UTC) Posts: 65 Location: Pennsylvani mostly Was thanked: 9 time(s) in 9 post(s)
|
Almost every time I've run into this, it's because I'm entering transactions into a period that hasn't been opened yet.
I don't know what dates you are entering, but let's say that they're in 2025, setting the dates to 2024 would probably fix it. Or you could go into CenterPoint and on any transaction screen, enter the date you are trying to use. As long as this isn't too far into the future, this automatically opens all the periods up to and including that date. You don't even have to finish entering a transaction as just entering the date is enough.
|
1 user thanked tony for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 8/29/2024(UTC) Posts: 14 Thanks: 3 times
|
Hi, thanks for the quick responses. Tony, I think your suggestion helped. The due date for the invoice was in Jan. 2025. Once I created an invoice in 2025, the error did go away. However, I've come across a new error that I also can't make sense of:
Exception of type 'RedWingSoftware.CenterPoint.Business.Exceptions.EmptyException' was thrown.
For reference, this is the payload:
{ "companyId": 2147470000, "customerId": 2147469959, "date": "2024-12-02T19:59:39.771Z", "invoiceNumber": "IN1106", "poReference": "#W231146/X", "termsId": 2147470000, "freight": 0, "miscellaneous": 0, "dueDate": "2025-01-01T20:59:39.633Z", "lines": [ { "salesItemId": 2147469969, "description": "Customer PO#: #W231146", "quantity": 2, "unitPrice": 5.69, "amount": 11.38 } ], "options": { "calculateTotals": true } }
I've tried creating a new database and a new company because I thought the system data might be in a bad state but that doesn't seem to be the case. I've also tried playing around with different fields by removing some of them.
Thanks
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/29/2024(UTC) Posts: 14 Thanks: 3 times
|
Okay, I think I figured it out. The customer that I was creating the invoice for had no more room on their credit limit and that was causing this failure. Thanks for the help!
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Red Wing Software Developer Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close