如何筛选生成经常性分录 (GL504000) 屏幕的记录
How can I filter records for the Generate Recurring Entries (GL504000) screen
我正在尝试修改“生成经常性交易”(GL504000) 屏幕,我想添加一个用户字段来过滤网格。我在 header 的 'Parameters' DAC 和网格的 'Schedule' DAC 的 DAC 扩展中添加了一个 UsrRecurringClass 用户字段。现在我想通过我添加到 header 的 selection 过滤该网格(我添加到两者的 UsrRecurringClass 字段)
问题是,我无法将该字段添加到视图 select (Schedule_List) 并让它产生任何影响(我确实在 [=25] 上将 CommitChanges 设置为 true =] 筛选字段)。
我已经将其添加到 'ScheduleRun' BLC 的图形扩展中,如下所示,但它似乎没有任何区别...
[PXFilterable]
public PXFilteredProcessing<Schedule, ScheduleRun.Parameters,
Where2<Where<ParametersExt.usrRecurringClass, IsNull, Or<ScheduleExt.usrRecurringClass, Equal<Current<ParametersExt.usrRecurringClass>>>>,
And2<Where<Schedule.active, Equal<True>>,
And<Schedule.nextRunDate, LessEqual<Current<ScheduleRun.Parameters.executionDate>>>>>> Schedule_List;
也许我没有正确执行 BQL,或者有更好的方法,使用视图委托 - 我不确定。
有什么想法吗?
我也做过类似的定制,也许模式对你有帮助。
public class ARCreateWriteOff_Extension : PXGraphExtension<ARCreateWriteOff>
{
#region Event Handlers
// First expose the PXFilterable view in the extension
[PXFilterable]
[PX.SM.PXViewDetailsButton(typeof(ARRegisterEx.refNbr), WindowMode = PXRedirectHelper.WindowMode.NewWindow)]
public PXFilteredProcessingJoin<ARRegisterEx> ARDocumentList;
// the ARDocumentList view is a long BQL statement I just removed most of it for the example
// Over write the IEnumerabel
protected virtual IEnumerable aRDocumentList()
{
// Get the current row and its extention
ARWriteOffFilter aRWriteOffFilter = Base.Filter.Current;
ARWriteOffFilterExt aRWriteOffFilterExt = aRWriteOffFilter.GetExtension<ARWriteOffFilterExt>();
// loop the values
foreach (ARRegisterEx item in Base.ARDocumentList.Select())
{
//check if the field is Null to return all data
if (string.IsNullOrWhiteSpace(aRWriteOffFilterExt.UsrEmployeeID))
{
yield return item;
}
else
{
// Here you will check if your filter matches the row level
if (aRWriteOffFilterExt.UsrEmployeeID == bAccountExt.UsrEmployeeID)
{
yield return item;
}
}
}
}
我正在尝试修改“生成经常性交易”(GL504000) 屏幕,我想添加一个用户字段来过滤网格。我在 header 的 'Parameters' DAC 和网格的 'Schedule' DAC 的 DAC 扩展中添加了一个 UsrRecurringClass 用户字段。现在我想通过我添加到 header 的 selection 过滤该网格(我添加到两者的 UsrRecurringClass 字段)
问题是,我无法将该字段添加到视图 select (Schedule_List) 并让它产生任何影响(我确实在 [=25] 上将 CommitChanges 设置为 true =] 筛选字段)。
我已经将其添加到 'ScheduleRun' BLC 的图形扩展中,如下所示,但它似乎没有任何区别...
[PXFilterable]
public PXFilteredProcessing<Schedule, ScheduleRun.Parameters,
Where2<Where<ParametersExt.usrRecurringClass, IsNull, Or<ScheduleExt.usrRecurringClass, Equal<Current<ParametersExt.usrRecurringClass>>>>,
And2<Where<Schedule.active, Equal<True>>,
And<Schedule.nextRunDate, LessEqual<Current<ScheduleRun.Parameters.executionDate>>>>>> Schedule_List;
也许我没有正确执行 BQL,或者有更好的方法,使用视图委托 - 我不确定。
有什么想法吗?
我也做过类似的定制,也许模式对你有帮助。
public class ARCreateWriteOff_Extension : PXGraphExtension<ARCreateWriteOff>
{
#region Event Handlers
// First expose the PXFilterable view in the extension
[PXFilterable]
[PX.SM.PXViewDetailsButton(typeof(ARRegisterEx.refNbr), WindowMode = PXRedirectHelper.WindowMode.NewWindow)]
public PXFilteredProcessingJoin<ARRegisterEx> ARDocumentList;
// the ARDocumentList view is a long BQL statement I just removed most of it for the example
// Over write the IEnumerabel
protected virtual IEnumerable aRDocumentList()
{
// Get the current row and its extention
ARWriteOffFilter aRWriteOffFilter = Base.Filter.Current;
ARWriteOffFilterExt aRWriteOffFilterExt = aRWriteOffFilter.GetExtension<ARWriteOffFilterExt>();
// loop the values
foreach (ARRegisterEx item in Base.ARDocumentList.Select())
{
//check if the field is Null to return all data
if (string.IsNullOrWhiteSpace(aRWriteOffFilterExt.UsrEmployeeID))
{
yield return item;
}
else
{
// Here you will check if your filter matches the row level
if (aRWriteOffFilterExt.UsrEmployeeID == bAccountExt.UsrEmployeeID)
{
yield return item;
}
}
}
}