客户屏幕复制上的销售订单清单过去错误

时间:2019-12-05 12:47:15

标签: acumatica

美好的一天

我在客户屏幕上创建了一个客户网格,显示该客户的销售订单。添加网格后,客户屏幕的过去复制功能给我一个错误。

"Error: Inserting  'Carrier Plugin Customer' record raised at least one error. Please review the errors. Error: 'Customer' cannot be empty." 

将以下内容添加到新网格后,错误开始:

    public PXSelect<SOOrder, Where<SOOrder.customerID, Equal<Current<BAccount.bAccountID>>>> SOList;

是否可以添加/更改代码或配置,以便过去的副本会忽略此新网格,因为它仅应显示数据。 据我所知,过去的副本正试图再次添加这些销售订单

编辑: 单击过去的操作时遇到的另一个错误是:

"The system failed to commit the SOList row."

编辑2: 链接到示例代码:

https://aboutitgroup-my.sharepoint.com/:u:/g/personal/jaco_aboutitgroup_co_za/EVJfMcBUjvxDktSaBD1DUNYBqiQEGABTqsreVdymDFjTDw?e=6jSFj2

1 个答案:

答案 0 :(得分:0)

我相信由于它们已成为屏幕的一部分,因此它正在尝试复制订单。

对于添加的任何基于查询的数据视图,请确保通过向视图中添加PXCopyPasteHiddenViewAttribute来将其从复制粘贴过程中排除。

例如:

[PXCopyPasteHiddenView]
public PXSelect<SOOrder, Where<SOOrder.customerID, Equal<Current<BAccount.bAccountID>>>> SOList;

如果需要,您可以限制复制和粘贴以选择可以使用PXCopyPasteHiddenFieldsAttribute的字段。下面是从OpportunityMaint复制的示例。此属性也可以直接应用于DAC,以排除在任何图形上使用的字段。

例如:

[PXCopyPasteHiddenFields(typeof(CROpportunity.details), typeof(CROpportunity.stageID), typeof(CROpportunity.resolution))]
        public PXSelect<CROpportunity,
            Where<CROpportunity.opportunityID, Equal<Current<CROpportunity.opportunityID>>>>
            OpportunityCurrent;