我刚刚在28-08-2016创建了QT,然后将businessDate更改为30-08-2016并将其复制到SOOrder,因此在复制到SOOrder之后,我再次打开QT并且状态将更改为已完成。但Soline上的RequestDate没有更新。
protected void SOOrder_Status_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (SOOrder)e.Row;
SOOrderExt rowExt = PXCache<SOOrder>.GetExtension<SOOrderExt>(row);
if(row != null)
{
if(row.OrderType == "QT" && row.Status == "C")
{
rowExt.UsrRequestDate = Base.Accessinfo.BusinessDate;
}
else
{
rowExt.UsrRequestDate = row.OrderDate;
}
}
}
protected void SOOrder_OrderDate_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (SOOrder)e.Row;
SOOrderExt rowExt = PXCache<SOOrder>.GetExtension<SOOrderExt>(row);
if(row != null)
{
rowExt.UsrRequestDate = row.OrderDate;
}
}
答案 0 :(得分:0)
我认为你的问题是错误的。您已订阅 SOLINE _RowUpdated,这是有关详细信息的事件。但复制订单功能只会更新文档(SOOrder),不会触及详细信息。你应该重新考虑一下你的流程。
答案 1 :(得分:0)
protected void SOOrder_Status_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (SOOrder)e.Row;
SOOrderExt rowExt = PXCache<SOOrder>.GetExtension<SOOrderExt>(row);
if(row != null)
{
if(row.OrderType == "QT" && row.Status == "C")
{
rowExt.UsrRequestDate = Base.Accessinfo.BusinessDate;
}
else
{
rowExt.UsrRequestDate = row.OrderDate;
}
}
}
protected void SOOrder_OrderDate_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (SOOrder)e.Row;
SOOrderExt rowExt = PXCache<SOOrder>.GetExtension<SOOrderExt>(row);
if(row != null)
{
rowExt.UsrRequestDate = row.OrderDate;
}
}