【问题标题】:Acumatica SOAP API release payment status errorAcumatica SOAP API 发布支付状态错误
【发布时间】:2020-07-08 00:30:30
【问题描述】:

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

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

当我查看新创建的付款的状态时,它的状态为已平衡,我认为应该可以释放它。是否需要其他状态才能解除付款?

我的代码:

//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 行。

【问题讨论】:

  • 您将Status 设置为Open 而不是将其设置为Balanced
  • 您在哪个版本的 Acumatica 上试用此代码?
  • @SamvelPetrosov,无论我在创建预付款时将状态设置为什么,当我将付款对象检索为“paymentToBeFound”时,它都会返回为“平衡”。它应该处于什么状态才能释放它?
  • @samol518,版本 5.30.3160,但我希望这适用于所有版本,因为我们正在升级到 6.1

标签: acumatica


【解决方案1】:

你写的代码没有问题。

我在评论中询问了您要问的版本,因为在较新的版本中我无法重现该问题。 您的版本是 2017 年 2 月上旬的版本,我确实发现了一个问题报告,其中提到此问题已得到修复。 虽然这适用于 2017 年 6 月上旬左右的 5.30.3715 或 6.10.0680 之前的版本。

如果您在这些版本或更高版本中尝试您的代码,它应该可以工作。

【讨论】:

  • 谢谢,我们将在升级到版本 6 后再次尝试。在版本 6 中是否有更好的方法来使用 REST API?
  • 对于那些偶然发现这一点的人,我确实如@samol518 所说,确认这在以后的版本中有效。
【解决方案2】:

如果有人遇到此屏幕,不是从开发的角度,而是更多地寻找错误的解释/答案,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 更新 12 (19.112.0045) 及更早版本
  • 2019R2 Update 4 (19.204.0021) 及更早版本

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

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

此问题已在 19.113.0043 构建版本中修复。

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

=== Dragons Live Beyond this point! ===

有人建议我按照这些步骤操作。同样,这绝不意味着这也适用于你,所以我会非常谨慎地接近。最好联系您的 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) 的链接。

增强现实模块

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

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

  • &lt;CompanyId&gt; 与您的公司 ID
  • &lt;BatchNbr&gt; 带有诊断通用查询返回的 BatchNbr
  • &lt;RefNbr&gt; 带有诊断通用查询返回的 RefNbr
  • &lt;DocType&gt; 带有诊断通用查询返回的 DocType:
    • 发票的INV
    • 用于贷项通知单的 CRM

很遗憾,我只有 AR 寄存器的 SQL。

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

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-22
    • 2020-09-20
    • 1970-01-01
    • 1970-01-01
    • 2011-11-17
    • 1970-01-01
    • 1970-01-01
    • 2013-08-25
    相关资源
    最近更新 更多