根据销售订单中的位置选择客户

时间:2018-09-10 19:07:35

标签: acumatica

当前,当我们选择“客户”时,销售订单中具有Acumatica默认功能,并且会自动过滤“位置”字段。

当用户选择“位置”并根据该“客户”列表进行过滤时,我需要具备。我尝试交换和自定义这两个数据字段“位置”和“客户”,但这似乎不起作用。可能正在影响其他任何领域吗?有人可以建议吗?

这是用于自定义数据字段的代码-

CustomerID

[PXDefault(typeof(Search<BAccountR.bAccountID, 
Where<BAccountR.bAccountID, Equal<Current<SOOrder.customerLocationID>>>>))]
        [CustomerActive(
typeof(Search<BAccountR.bAccountID, Where<True, Equal<True>, 
And<BAccountR.defLocationID, Equal<Current<SOOrder.customerLocationID>>>>>), // TODO: remove fake Where after AC-101187
Visibility = PXUIVisibility.SelectorVisible, 
DescriptionField = typeof(Customer.acctName), 
Filterable = true)]

CustomerLocationID

[LocationID(typeof(Where<Location.isActive, Equal<True>,
And<MatchWithBranch<Location.cBranchID>>>), DescriptionField = typeof(Location.descr), Visibility = PXUIVisibility.SelectorVisible)]

[PXDefault(typeof(Coalesce<Search2<BAccountR.defLocationID,
InnerJoin<CRLocation, On<CRLocation.bAccountID, Equal<BAccountR.bAccountID>, And<CRLocation.locationID, Equal<BAccountR.defLocationID>>>>,
Where<CRLocation.isActive, Equal<True>,
And<MatchWithBranch<CRLocation.cBranchID>>>>,
Search<CRLocation.locationID,
Where<CRLocation.isActive, Equal<True>, And<MatchWithBranch<CRLocation.cBranchID>>>>>))]
[PXForeignReference(
typeof(CompositeKey<
Field<SOOrder.customerID>.IsRelatedTo<Location.bAccountID>,
Field<SOOrder.customerLocationID>.IsRelatedTo<Location.locationID>
>))]

0 个答案:

没有答案