Acumatica SOAP API发布付款状态错误

时间:2017-07-25 17:42:26

标签: acumatica

我正在努力通过SOAP API发布Acumatica付款,如I210基于合同的Web服务指南here的第117页所述。我已将代码实施到手册规范中,但是当我发布付款时,我收到此错误:

  

TX错误#3:文档状态无效。在   PX.Objects.AR.ARPaymentEntry.Release

当我查看新创建的付款的状态时,它的状态为Balanced,我认为应该可以发布。付款需要另外一种状态才能被释放吗?

我的代码:

//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);

错误发生在InvokeResult行。

2 个答案:

答案 0 :(得分:1)

您编写的代码没有任何问题。

我在评论中问你是什么版本,因为在新版本中我无法重现这个问题。 您的版本是从2017年2月初开始的,我确实发现了一个问题报告,提到此问题已修复。 虽然这是针对2017年6月初左右的5.30.3715或6.10.0680的版本。

如果您尝试使用这些版本或更新版本的代码,它应该可以正常工作。

答案 1 :(得分:0)

如果没有人从开发角度来看此屏幕,而只是在寻找错误的解释/答案Error on batch posting: TX Error: Document Status is invalid for processing

此解决方案已由我们的ISV合作伙伴+ Acumatica支持人员提供给我。我也强烈建议您也与ISV合作伙伴一起记录支持案例,因为我们都知道每个实现都是不同的,但是我在这里留下了这个答案,以便您至少了解正在发生的事情。

所遇到的错误的根本原因是已知问题,下面的KB article中对此进行了描述。

不幸的是,如果您不是ISV合作伙伴,则将无法访问该链接,但是内容如下:

根本原因:

此错误通常表示文档已经发布,但是寄存器表中的记录(APRegister或ARRegister,取决于文档类型)被标记为未发布。

尤其是,这意味着在用户确认文档尚未发布之前,请勿尝试以下操作,如“疑难解答步骤”部分所述:

  • 删除文档
  • 通过SQL对发布的属性进行的任何修改

对于以下Acumatica ERP版本,这是一个已知问题:

  • 2018R2版本的所有版本
  • 2019R1 Update 12(19.112.0045)及更早版本
  • 2019R2 Update 4(19.204.0021)及更早版本

有关详细信息,请参阅“已知问题”部分中的AC-140721问题。

AC-140721:很少尝试释放应付帐款或 应收帐款单据,用户可能会得到不一致的数据。在 在某些情况下,文档状态保持平衡,但是, 由于以下错误,无法发布文档:TX错误: 文件状态无效,无法处理。在其他情况下, 文档处于“打开”或“关闭”状态,但未发布任何条目 到GL。

此问题已在19.113.0043构建版本中得到解决。

我们强烈建议将实例更新到2019R1的此版本或更高版本,以防止将来发生此问题。

===龙不止于此! ===

已建议我执行以下步骤。再一次,这绝不意味着这也将对您有效,因此我会格外谨慎。最好与您的ISV合作伙伴联系。但是,我将在此处留下步骤以对该问题进行全面解答。

目前,要修复损坏的文档,请使用以下步骤:

要查找所有受影响的文档,请使用上述知识库文章中随附的GI。

由于您很可能无法访问知识库文章,因此这是2种常规查询的XML

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>

第1步:通过应用以下SQL脚本,更新“状态”字段值,“已释放”标志值以及到GL批处理(BatchNbr)的链接。

AR模块

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

在上面的脚本中,替换以下内容:

  • <CompanyId>和您的公司ID
  • <BatchNbr>以及诊断通用查询返回的BatchNbr
  • <RefNbr>以及诊断通用查询返回的RefNbr
  • <DocType>,其诊断通用查询返回的DocType为:
    • 发票收据
    • 贷方凭证的客户关系管理

不幸的是,我只有用于AR寄存器的SQL。

尽管可以使SQL脚本通用,以便可以更新通用查询返回的所有不一致的文档,但我们建议您仅将其应用于特定文档。该脚本会更改敏感数据,不应以其他形式执行。

步骤2:在“验证客户余额”(AR509900)表单上,处理受影响的客户。

我希望这对其他人有帮助,即使只是为了使问题更清晰。