0
votes

I'm working on releasing an Acumatica payment via the SOAP API as documented on page 117 of the I210 Contract Based Web Services guide here. I have implemented the code to the manual spec however when I release a payment I'm getting this error:

TX Error #3: Document Status is invalid for processing. at PX.Objects.AR.ARPaymentEntry.Release

When I look at the status of the newly created payment, it has a status Balanced which I believe should be able to be released. Is there another status that the payment needs to be in order to be released?

My code:

//creates the order to attach the payment to
SalesOrder newOrder = (SalesOrder)await client.PutAsync(orderToBeCreated);

var wooPaymentRef = "Test";
//Create a payment for the order
Payment paymentToBeCreated = new Payment()
{
    Type = new StringValue { Value = "Prepayment" },
    Status = new StringValue { Value = "Open" },
    PaymentMethod = new StringValue { Value = store.AcumaticaPaymentMethod },
    PaymentAmount = new DecimalValue { Value = Convert.ToDecimal(wooOrder.order.total) },
    CustomerID = newOrder.CustomerID,
    OrdersToApply = new PaymentOrder[] {
    new PaymentOrder()
    {
        OrderType = new StringValue { Value = "SO"},
        OrderNbr = newOrder.OrderNbr,
        AppliedToOrder = newOrder.OrderTotal
    }
    },
    CashAccount = new StringValue { Value = store.AcumaticaPaymentMethod },
    PaymentRef = new StringValue { Value = wooPaymentRef },
    Hold = new BooleanValue {  Value = false}
};

Payment newPayment = (Payment)await client.PutAsync(paymentToBeCreated);

//Extra step to get the newly created payment just to make sure it's the most recent
Payment paymentToBeFound = new Payment
{
    Type = new StringSearch { Value = newPayment.Type.Value },
    ReferenceNbr = new StringSearch { Value = newPayment.ReferenceNbr.Value }
};

Payment currentPayment = (Payment)await client.GetAsync(paymentToBeFound);

//Release the payment
InvokeResult invokeResult = await client.InvokeAsync(currentPayment, new ReleasePayment());
//Monitor the process
ProcessResult processResult = await LongProcessRunner.GetProcessResult(client, invokeResult);

The error occurs at the InvokeResult line.

2
You are setting the Status to Open instead of setting it to Balanced - Samvel Petrosov
What version of Acumatica are you trying this code on? - samol518
@SamvelPetrosov, regardless of what I set the status to when I create the prepayment, it comes back as "Balanced" when I retrieve the payement object as "paymentToBeFound". What status should it be in order to release it? - big_water
@samol518, Version 5.30.3160, but I would like this to work on all versions since we are in the process of upgrading to 6.1 - big_water

2 Answers

1
votes

There is nothing wrong with the code you wrote.

I asked you in the comment what version you were asking since in the newer version I was not able to reproduce the issue. Your version is from early February 2017, I did found an issue report that was mentioning that this problem had been fixed. Though this is for version superior to 5.30.3715 or 6.10.0680 which is around early June 2017 .

If you try your code in these version or newer it should work.

0
votes

If anyone comes across this screen, not from a development perspective, but more just looking for an explanation/answer to the error, Error on batch posting: TX Error: Document Status is invalid for processing.

This solution has been provided to me by our ISV Partner + Acumatica Support. I would highly encourage you to log a support case with your ISV partner as well, as we all know that each implementation is different, but I'm leaving this answer here so that you at least know what's going on.

The root cause of the encountered error is a known issue, that is described in the following KB article.

Unfortunately, if you're not an ISV partner, you would not be able to access the link, but the contents are:

Root cause:

This error usually means that the document has already been released, but the record in the register table (APRegister or ARRegister, depending on the document type) is marked as unreleased.

In particular, this means that the following actions should not be attempted until the user confirms that the document has not been released, as described in the Troubleshooting steps section:

  • Deletion of the document
  • Any modification of released attributes through SQL

This is a known issue for the following builds of Acumatica ERP:

  • All builds of 2018R2 version
  • 2019R1 Update 12 (19.112.0045) and earlier
  • 2019R2 Update 4 (19.204.0021) and earlier

For more information, see the AC-140721 issue in the Known Issues section.

AC-140721: Rarely, after an attempt to release accounts payable or accounts receivable documents, users could get inconsistent data. In some cases, the document status remained Balanced, however, the document could not be released due to the following error: TX Error: Document Status is invalid for processing. In some other cases, a document got the Open or Closed status, whereas no entries were posted to GL.

This issue has been already fixed in 19.113.0043 Build Version.

We highly recommend updating the instance to this or later release of 2019R1 to prevent this issue from happening in the future.

=== Dragons Lives Beyond This Point! ===

I have been advised to follow these steps. Again, by no means does it mean that this would work for you too, so I would approach with severe caution. It would be best to approach your ISV Partner. I am however leaving the steps here for a holistic answer to the question.

As for now, to fix the corrupted documents, please use the following steps:

To find all the affected documents, please use the GI's attached in the KB article mentioned above.

Since you most likely won't have access to the KB Article, here's the XML for the 2 Generic Inquiries

GL4APReg

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
  <relations format-version="3" relations-version="20190410" main-table="GIDesign" stable-sharing="True" file-name="(Name)">
    <link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationParameter (DesignID, NavigationScreenLineNbr)" to="GINavigationScreen (DesignID, LineNbr)" />
    <link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
    <link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
    <link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
    <link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
    <link from="GISort (DesignID)" to="GIDesign (DesignID)" />
    <link from="GITable (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
    <link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
    <link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
    <link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
    <link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
    <link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
    <link from="FilterHeader (ScreenID)" to="SiteMap (ScreenID)" />
    <link from="FilterRow (FilterID)" to="FilterHeader (FilterID)" />
    <link from="PivotTable (NoteID)" to="FilterHeader (RefNoteID)" />
    <link from="PivotField (ScreenID, PivotTableID)" to="PivotTable (ScreenID, PivotTableID)" />
    <link from="MUIScreen (NodeID)" to="SiteMap (NodeID)" />
    <link from="MUIWorkspace (WorkspaceID)" to="MUIScreen (WorkspaceID)" type="FromMaster" linkname="workspaceToScreen" split-location="yes" updateable="True" />
    <link from="MUISubcategory (SubcategoryID)" to="MUIScreen (SubcategoryID)" type="FromMaster" updateable="True" />
    <link from="MUITile (ScreenID)" to="SiteMap (ScreenID)" />
    <link from="MUIWorkspace (WorkspaceID)" to="MUITile (WorkspaceID)" type="FromMaster" linkname="workspaceToTile" split-location="yes" updateable="True" />
    <link from="MUIArea (AreaID)" to="MUIWorkspace (AreaID)" type="FromMaster" updateable="True" />
    <link from="MUIPinnedScreen (NodeID, WorkspaceID)" to="MUIScreen (NodeID, WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
    <link from="MUIFavoriteWorkspace (WorkspaceID)" to="MUIWorkspace (WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
    <link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
    <link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
    <link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="FilterHeader (NoteID)" to="Note (NoteID)" type="Note" />
  </relations>
  <layout>
    <table name="GIDesign">
      <table name="GIFilter" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
        <table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
      </table>
      <table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
      <table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
      <table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
        <table name="GINavigationParameter" uplink="(DesignID, LineNbr) = (DesignID, NavigationScreenLineNbr)" />
      </table>
      <table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
      <table name="GISort" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GITable" uplink="(DesignID) = (DesignID)">
        <table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
          <table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
            <table name="Note" uplink="(NoteID) = (NoteID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
          <table name="Note" uplink="(NoteID) = (NoteID)" />
          <table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
        </table>
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIWhere" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
        <table name="FilterHeader" uplink="(ScreenID) = (ScreenID)">
          <table name="FilterRow" uplink="(FilterID) = (FilterID)" />
          <table name="PivotTable" uplink="(RefNoteID) = (NoteID)">
            <table name="PivotField" uplink="(ScreenID, PivotTableID) = (ScreenID, PivotTableID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="MUIScreen" uplink="(NodeID) = (NodeID)">
          <table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
        </table>
        <table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
      </table>
      <table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
        <table name="FilterHeader" uplink="(ScreenID) = (ScreenID)">
          <table name="FilterRow" uplink="(FilterID) = (FilterID)" />
          <table name="PivotTable" uplink="(RefNoteID) = (NoteID)">
            <table name="PivotField" uplink="(ScreenID, PivotTableID) = (ScreenID, PivotTableID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="MUIScreen" uplink="(NodeID) = (NodeID)">
          <table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
        </table>
        <table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
      </table>
      <table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
        <table name="FilterHeader" uplink="(ScreenID) = (ScreenID)">
          <table name="FilterRow" uplink="(FilterID) = (FilterID)" />
          <table name="PivotTable" uplink="(RefNoteID) = (NoteID)">
            <table name="PivotField" uplink="(ScreenID, PivotTableID) = (ScreenID, PivotTableID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="MUIScreen" uplink="(NodeID) = (NodeID)">
          <table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
        </table>
        <table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
      </table>
      <table name="Note" uplink="(NoteID) = (NoteID)" />
    </table>
    <table name="MUIWorkspace">
      <table name="MUIFavoriteWorkspace" uplink="(WorkspaceID) = (WorkspaceID)" />
    </table>
    <table name="MUISubcategory" />
    <table name="MUIArea" />
  </layout>
  <data>
    <GIDesign>
      <row DesignID="8dcb8839-34fc-44b9-a5f2-7a10e050d54f" Name="GL4Apreg" FilterColCount="3" PageSize="0" ExportTop="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0" ExposeViaMobile="0">
        <GISort LineNbr="1" IsActive="1" DataFieldName="APRegister.docDate" SortOrder="D" />
        <GITable Alias="GLTran" Name="PX.Objects.GL.GLTran">
          <GIResult LineNbr="5" SortOrder="5" IsActive="1" Field="batchNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="eeb26550-54c3-4d6e-9671-710fa929e0db" />
        </GITable>
        <GITable Alias="APTran" Name="PX.Objects.AP.APTran" />
        <GITable Alias="APRegister" Name="PX.Objects.AP.APRegister">
          <GIRelation LineNbr="2" ChildTable="GLTran" IsActive="1" JoinType="I">
            <GIOn LineNbr="4" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
            <GIOn LineNbr="3" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
          </GIRelation>
          <GIRelation LineNbr="1" ChildTable="APTran" IsActive="1" JoinType="I">
            <GIOn LineNbr="2" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
            <GIOn LineNbr="1" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
          </GIRelation>
          <GIResult LineNbr="4" SortOrder="4" IsActive="1" Field="docDate" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="0" RowID="12cad746-594e-457d-a858-0dfd7da0d016" />
          <GIResult LineNbr="3" SortOrder="3" IsActive="1" Field="released" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="5d7f706a-177d-49e3-a830-97d49a920481" />
          <GIResult LineNbr="2" SortOrder="2" IsActive="1" Field="refNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="b17cf80d-c85d-47eb-aa39-34cdead539b9" />
          <GIResult LineNbr="1" SortOrder="1" IsActive="1" Field="docType" IsVisible="1" DefaultNav="1" QuickFilter="0" FastFilter="1" RowID="657601c5-8e36-4282-8a46-6ab97e684f32" />
        </GITable>
        <GIWhere LineNbr="4" IsActive="1" DataFieldName="APTran.released" Condition="E " IsExpression="1" Value1="True" Value2="False" CloseBrackets=")        " Operation="A" />
        <GIWhere LineNbr="3" IsActive="1" OpenBrackets="(        " DataFieldName="APRegister.released" Condition="E " IsExpression="1" Value1="False" Value2="False" Operation="A" />
        <GIWhere LineNbr="2" IsActive="1" DataFieldName="GLTran.debitAmt" Condition="G " IsExpression="0" Value1="0" Operation="A" />
        <GIWhere LineNbr="1" IsActive="1" DataFieldName="GLTran.module" Condition="E " IsExpression="1" Value1="AP" Operation="A" />
      </row>
    </GIDesign>
  </data>
</data-set>

GL4ARReg:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
  <relations format-version="3" relations-version="20170805" main-table="GIDesign" stable-sharing="True" file-name="(Name)">
    <link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
    <link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
    <link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
    <link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
    <link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
    <link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
    <link from="GISort (DesignID)" to="GIDesign (DesignID)" />
    <link from="GITable (DesignID)" to="GIDesign (DesignID)" />
    <link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
    <link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
    <link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
    <link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
    <link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
    <link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
    <link from="MUIScreen (NodeID)" to="SiteMap (NodeID)" />
    <link from="MUIWorkspace (WorkspaceID)" to="MUIScreen (WorkspaceID)" type="FromMaster" linkname="workspaceToScreen" split-location="yes" updateable="True" />
    <link from="MUISubcategory (SubcategoryID)" to="MUIScreen (SubcategoryID)" type="FromMaster" updateable="True" />
    <link from="MUITile (ScreenID)" to="SiteMap (ScreenID)" />
    <link from="MUIWorkspace (WorkspaceID)" to="MUITile (WorkspaceID)" type="FromMaster" linkname="workspaceToTile" split-location="yes" updateable="True" />
    <link from="MUIArea (AreaID)" to="MUIWorkspace (AreaID)" type="FromMaster" updateable="True" />
    <link from="MUIPinnedScreen (NodeID, WorkspaceID)" to="MUIScreen (NodeID, WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
    <link from="MUIFavoriteWorkspace (WorkspaceID)" to="MUIWorkspace (WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
    <link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
    <link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
    <link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
    <link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
  </relations>
  <layout>
    <table name="GIDesign">
      <table name="GIFilter" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
        <table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
      </table>
      <table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
      <table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
      <table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
        <table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
      </table>
      <table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
      <table name="GISort" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GITable" uplink="(DesignID) = (DesignID)">
        <table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
          <table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
            <table name="Note" uplink="(NoteID) = (NoteID)" />
          </table>
          <table name="Note" uplink="(NoteID) = (NoteID)" />
        </table>
        <table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
          <table name="Note" uplink="(NoteID) = (NoteID)" />
          <table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
        </table>
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="GIWhere" uplink="(DesignID) = (DesignID)">
        <table name="Note" uplink="(NoteID) = (NoteID)" />
      </table>
      <table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
        <table name="MUIScreen" uplink="(NodeID) = (NodeID)">
          <table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
        </table>
        <table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
      </table>
      <table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
        <table name="MUIScreen" uplink="(NodeID) = (NodeID)">
          <table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
        </table>
        <table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
      </table>
      <table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
        <table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
        <table name="MUIScreen" uplink="(NodeID) = (NodeID)">
          <table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
        </table>
        <table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
      </table>
      <table name="Note" uplink="(NoteID) = (NoteID)" />
    </table>
    <table name="MUIWorkspace">
      <table name="MUIFavoriteWorkspace" uplink="(WorkspaceID) = (WorkspaceID)" />
    </table>
    <table name="MUISubcategory" />
    <table name="MUIArea" />
  </layout>
  <data>
    <GIDesign>
      <row DesignID="188ee0c1-8090-4d7c-950d-e46a5807cbce" Name="GL4Arreg" FilterColCount="3" PageSize="0" ExportTop="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0" ExposeViaMobile="0">
        <GISort LineNbr="1" IsActive="1" DataFieldName="ARRegister.docDate" SortOrder="D" />
        <GITable Alias="GLTran" Name="PX.Objects.GL.GLTran">
          <GIResult LineNbr="5" IsActive="1" Field="batchNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="e00f46e9-25dc-4443-94ce-0be6a3eae9a0" />
        </GITable>
        <GITable Alias="ARTran" Name="PX.Objects.AR.ARTran">
          <GIResult LineNbr="8" IsActive="1" Field="tranAmt" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="b90b9072-49a3-410b-a9e8-5012e3d2fdf2" />
          <GIResult LineNbr="7" IsActive="1" Field="lineType" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="88cf973c-a6a7-47f0-b2d0-7fdaf20b8182" />
          <GIResult LineNbr="6" IsActive="1" Field="lineNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="477fd001-d096-4335-87ef-b2897149ce06" />
        </GITable>
        <GITable Alias="ARRegister" Name="PX.Objects.AR.ARRegister">
          <GIRelation LineNbr="2" ChildTable="GLTran" IsActive="1" JoinType="I">
            <GIOn LineNbr="5" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
            <GIOn LineNbr="4" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
          </GIRelation>
          <GIRelation LineNbr="1" ChildTable="ARTran" IsActive="1" JoinType="I">
            <GIOn LineNbr="3" ParentField="released" Condition="NE" ChildField="released" Operation="A" />
            <GIOn LineNbr="2" ParentField="refNbr" Condition="E " ChildField="refNbr" Operation="A" />
            <GIOn LineNbr="1" ParentField="docType" Condition="E " ChildField="tranType" Operation="A" />
          </GIRelation>
          <GIResult LineNbr="4" IsActive="1" Field="docDate" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="192e173f-235e-4a28-8a64-189adea0df5c" />
          <GIResult LineNbr="3" IsActive="1" Field="released" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="47a63a77-349f-4536-9aa4-d6e876d9147d" />
          <GIResult LineNbr="2" IsActive="1" Field="refNbr" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="4e06f0f9-6d2f-4486-af51-20f17ad296dc" />
          <GIResult LineNbr="1" IsActive="1" Field="docType" IsVisible="1" DefaultNav="1" QuickFilter="0" RowID="14997f39-04d5-4b74-812e-04b794c7dfbb" />
        </GITable>
        <GIWhere LineNbr="2" IsActive="1" DataFieldName="GLTran.debitAmt" Condition="G " IsExpression="0" Value1="0" Operation="A" />
        <GIWhere LineNbr="1" IsActive="1" DataFieldName="GLTran.module" Condition="E " IsExpression="1" Value1="AR" Operation="A" />
      </row>
    </GIDesign>
  </data>
</data-set>

Step 1: Update the Status field value, the Released flag value, and the link to the GL batch (BatchNbr) by applying the following SQL script.

AR Module

UPDATE ARRegister
SET Status   = 'N',
    Released = 1,
    Hold     = 0,
    BatchNbr = <BatchNbr>
WHERE CompanyId = <CompanyId>
    AND DocType = <DocType>
    AND RefNbr = <RefNbr>

In the script above, replace the following:

  • <CompanyId> with your Company ID
  • <BatchNbr> with the BatchNbr returned by the diagnostic generic inquiry
  • <RefNbr> with the RefNbr returned by the diagnostic generic inquiry
  • <DocType> with the DocType returned by the diagnostic generic inquiry:
    • INV for an invoice
    • CRM for a credit memo

Unfortunately, I only have the SQL for the AR Register.

Although it is possible to make the SQL script universal so that it can update all inconsistent documents returned by the generic inquiry, we recommend that you apply it to specific documents only. This script changes sensitive data and should not be executed in other forms.

Step 2: On the Validate Customer Balance (AR509900) form, process the affected customers.

I hope this helps someone else, even if it's just to provide clarity into the issue.