修改选择器默认排序 [英] Modify Selector Default Sorting

查看:53
本文介绍了修改选择器默认排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想修改SO Order Entry屏幕中Order Nbr字段的选择器,默认情况下按Order Date按降序排序。我试图通过添加Desc< SOOrder.orderType>修改SO.RefNbr。到OrderBy<> ...

I want to modify the selector of the Order Nbr field in the SO Order Entry screen to be sorted by the Order Date in descending order by default. I tried to modify the SO.RefNbr adding a Desc<SOOrder.orderType> to the OrderBy<>...

[PXMergeAttributes(Method = MergeMethod.Merge)]
[SO.RefNbr(typeof(Search2<SOOrder.orderNbr,
    LeftJoinSingleTable<Customer, On<SOOrder.customerID, Equal<Customer.bAccountID>,
        And<Where<Match<Customer, Current<AccessInfo.userName>>>>>>,
    Where<SOOrder.orderType, Equal<Optional<SOOrder.orderType>>,
    And<Where<SOOrder.orderType, Equal<SOOrderTypeConstants.transferOrder>,
        Or<Customer.bAccountID, IsNotNull>>>>,
    OrderBy<Desc<SOOrder.orderDate, Desc<SOOrder.orderNbr>>>>), Filterable = true)]
public virtual void SOOrder_OrderNbr_CacheAttached(PXCache sender) { }

但这没有影响。有趣的是,如果我删除了Desc< SOOrder.orderNbr> OrderBy<>术语的部分,它导致选择器中的项目仍由Order Nbr排序,但现在按升序排序。

However, that had no affect. Interestingly if I remove the Desc<SOOrder.orderNbr> portion of the OrderBy<> term it results in the items in the Selector still being sorted by the Order Nbr but now in Ascending order. Is it possible to sort Selectors by fields other than their referenced search field?

推荐答案

不幸的是,PXSelectorAttribute只能按键(外国)进行排序。 )或替代键。排序中使用的任何其他字段都不会影响排序。

Unfortunately the PXSelectorAttribute will only sort by key(foreign) or a substitute key. Any other field used on the sort won't affect the sorting.

这篇关于修改选择器默认排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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