AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
Reversing a Journal...
 
Notifications
Clear all

Questions Reversing a JournalTransaction using the Rest API

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by Tim Rodman 5 years ago
2 Posts
2 Users
0 Reactions
1,653 Views
RSS
dteirney
Posts: 4
 dteirney
Topic starter
February 9, 2021 7:15 am
(@dteirney)
Active Member
Joined: 5 years ago

I want to be able to reverse a Journal Transaction through the REST API, like can be done through the UI. I've extended the JournalTransaction endpoint (version 17.200.001) and added an action that invokes the ReverseBatch action.

Unfortunately, when I invoke the API I'm getting an "PX.Data.PXInvalidOperationException" message for the outer exception with an incomprehensible stack trace that didn't provide much insight into why it's not working.

The innerException sheds a little light with the message "The record cannot be saved." with the following stack trace: "at PX.Data.PXSave`1.<Handler>d__2.MoveNext()\r\n at PX.Data.PXAction`1.<Press>d__28.MoveNext()\r\n at PX.Data.PXAction`1.<Press>d__28.MoveNext()\r\n at PX.Api.SyImportProcessor.SyStep.a(Object A_0, PXFilterRow[] A_1, PXFilterRow[] A_2)\r\n at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()"

"The record cannot be saved" error was mentioned in another thread here related to import processing, resolved by having a Dialog Action set to Yes. That doesn't seem like something that's related to API invocation, so what might be some next steps to try and determine why the API invocation isn't working?

I've tried passing through an entity body ID that doesn't exist, and that provides a different error - something akin to the action being disabled so it seems like the action is being triggered as expected - it's just not working for some reason.

If it's perhaps related, I have extended JournalTransaction to expose Orig. Batch Number, Reversing Entry, and Reversing Batches (because those fields were going to be used to determine what JournalTransactions have been reversed)

If someone else has managed to reverse a JournalTransaction via the API and can provide some further information that would be much appreciated.


1 Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
March 19, 2021 5:49 pm
(@timrodman)
Famed Member
Joined: 10 years ago

Hi @dteirney,

I recommend posting this on StackOverflow (click here) where a good number of Acumatica developers hang out.


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 28 Online
  • 2,338 Members
Our newest member: Shoaib Shafquat
Latest Post: Pick List report suddenly not splitting on Shipment
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×