【发布时间】:2020-02-20 00:32:17
【问题描述】:
每当屏幕第一次为每条记录加载时,我想向用户显示一个带有一些消息的弹出窗口。
例如,当为特定销售订单加载销售订单屏幕时,它应该只显示一次弹出窗口。然后用户导航到下一个销售订单,它应该再次显示该特定销售订单的弹出窗口一次。
我已经在构造函数和 RowSelected 事件中编写了代码,但它没有当前记录。也就是说,CRCurrentCaseNotes 在这两个事件中始终为 null。但是,使用按钮(下面的代码示例中的ViewNotes),它可以工作。
[PXViewName("CRCurrentCaseNotes")]
[PXCopyPasteHiddenView]
public PXSelect<Note,
Where<CRCase.caseID, Equal<Current<CRCase.caseID>>>> CRCurrentCaseNotes;
public CRCaseMaintExtension()
: base()
{
if (CRCurrentCaseNotes.Current != null)
{
CRCurrentCaseNotes.AskExt();
}
}
protected virtual void CRCase_RowSelecting(PXCache cache, PXRowSelectingEventArgs e)
{
var caseRow = (CRCase)e.Row;
if (caseRow == null) return;
if (CRCurrentCaseNotes.Current != null)
{
CRCurrentCaseNotes.AskExt();
}
}
// SAME CODE WORKS WITH THE BUTTON CLICK
public PXAction<CRCase> viewNotes;
[PXUIField(DisplayName = "View Notes")]
[PXButton]
protected virtual IEnumerable ViewNotes(PXAdapter adapter)
{
if (CRCurrentCaseNotes.Current != null)
{
CRCurrentCaseNotes.AskExt();
}
return adapter.Get();
}
【问题讨论】:
-
谁能推荐一下?
标签: acumatica