美好的一天
我在客户屏幕上创建了一个客户网格,显示该客户的销售订单。添加网格后,客户屏幕的过去复制功能给我一个错误。
"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: 链接到示例代码:
答案 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;