Acumatica 在RowPersisting事件中将值从自定义字段复制到TaxRegistrationID字段

Acumatica 在RowPersisting事件中将值从自定义字段复制到TaxRegistrationID字段,acumatica,acumatica-kb,Acumatica,Acumatica Kb,我试图将值从名为“CustomerText.UsrRfc”的自定义字段复制到TaxRegistrationID字段,但它在Customers屏幕中不起作用,我使用的是Customer_Row持久化事件处理程序 这是CustomerText.UsrRfc字段: 这是TaxRegistrationID字段: 这是RowPersisting事件: protected void Customer_RowPersisting(PXCache cache, PXRowPersistingEventArg

我试图将值从名为“CustomerText.UsrRfc”的自定义字段复制到TaxRegistrationID字段,但它在Customers屏幕中不起作用,我使用的是Customer_Row持久化事件处理程序

这是CustomerText.UsrRfc字段:

这是TaxRegistrationID字段:

这是RowPersisting事件:

protected void Customer_RowPersisting(PXCache cache, PXRowPersistingEventArgs e)
{
  Customer row = (Customer)e.Row;

  if (row == null)
  {
      return;
  }

  var customerExt = row.GetExtension<BAccountExt>();

  row.TaxRegistrationID = customerExt.UsrRfc;
}
受保护的无效客户保存(PXCache缓存,PXRowPersistingEventArgs e)
{
客户行=(客户)e行;
if(行==null)
{
返回;
}
var customerExt=row.GetExtension();
row.TaxRegistrationID=CustomerText.UsrRfc;
}
我试图将该值复制到另一个字段,如“Account Ref#”,但效果很好


您能帮我解决这个问题吗?

屏幕截图中的TaxRegistrationID字段来自位置DAC,而不是客户:

您需要更改解决方案以更新正确视图中的字段