如何过滤生成重复条目 (GL504000) 屏幕的记录 [英] How can I filter records for the Generate Recurring Entries (GL504000) screen

查看:12
本文介绍了如何过滤生成重复条目 (GL504000) 屏幕的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试修改 Generate Recurring Transactions (GL504000) 屏幕,并且我想添加一个用户字段来过滤网格.我已将 UsrRecurringClass 用户字段添加到标题的Parameters"DAC 和网格的Schedule"DAC 的DAC 扩展中.现在我想通过添加到标题中的选择来过滤该网格(我已添加到两者中的 UsrRecurringClass 字段)

I'm trying to modify the Generate Recurring Transactions (GL504000) screen, and I want to add a user field to filter the grid. I've added a UsrRecurringClass user field to DAC extensions of both the 'Parameters' DAC for the header, and the 'Schedule' DAC for the grid. Now I want to filter that grid by the selection I've added to the header (The UsrRecurringClass field I've added to both)

问题是,我无法将该字段添加到视图选择 (Schedule_List) 并使其有所不同(我确实在标题过滤器字段上将 CommitChanges 设置为 true).

The problem is, I can't add that field to the View select (Schedule_List) and have it make any difference (I did set the CommitChanges to true on the header filter field).

我已将其添加到ScheduleRun"BLC 的图形扩展中,如下所示,但它似乎没有任何区别...

I've added this to graph extension of the 'ScheduleRun' BLC, as follows, but it doesn't seem to make any difference...

[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,或者有更好的方法,使用 View 委托 - 我不确定.

Maybe I'm not doing the BQL correctly, or there's a better way, using the View delegate - I'm not sure.

有什么想法吗?

推荐答案

我也做过类似的定制,也许模式对你有帮助.

I have done a similar customization, maybe the pattern will help you.

  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) 屏幕的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆