Acumatica-AlloAddNew in页面上的非库存项目屏幕
你好 我在DAC中有一个PXSelector字段,它只显示非库存项目Acumatica-AlloAddNew in页面上的非库存项目屏幕,acumatica,Acumatica,你好 我在DAC中有一个PXSelector字段,它只显示非库存项目 public abstract class inventoryID : IBqlField { } [PXDBInt] [PXSelector(typeof(Search2<InventoryItem.inventoryID, LeftJoin<RECOInventoryItem, On<RECOInventoryIte
public abstract class inventoryID : IBqlField { }
[PXDBInt]
[PXSelector(typeof(Search2<InventoryItem.inventoryID,
LeftJoin<RECOInventoryItem, On<RECOInventoryItem.inventoryID, Equal<InventoryItem.inventoryID>>>,
Where<RECOInventoryItem.inventoryID, IsNull,
And<InventoryItem.itemType, Equal<ItemType.NON_STOCK>,
And<InventoryItem.stkItem, Equal<False>>>>>),
typeof(InventoryItem.inventoryCD),
typeof(InventoryItem.descr),
DescriptionField = typeof(InventoryItem.descr))]
[PXUIField(DisplayName = "Inventory")]
[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
public virtual int? InventoryID { get; set; }
如何将AllowAddNew重定向设置为非库存项页面而不是库存项页面
如何覆盖InventoryItem的PxPrimaryGraph,使我重定向到的图形是非库存项,而不是库存项
非常感谢您的建议和建议。
PXPrimaryGraph
可以使用DAC字段上的BQL条件将一个DAC绑定到多个图形,如InventoryItem DAC所示:
[PXPrimaryGraph(new Type[]
{
typeof(NonStockItemMaint),
typeof(InventoryItemMaint)
},
new Type[]
{
typeof(Where<InventoryItem.stkItem, Equal<False>>),
typeof(Where<InventoryItem.stkItem, Equal<True>>)
})]
[PXPrimaryGraph(新类型[]]
{
类型(非库存项目维护),
类型(InventoryItemMaint)
},
新类型[]
{
类型(其中),
类型(其中)
})]
这适用于AllowEdit
功能,因为用于图形重定向的InventoryItem.stkItem
字段已填充到要编辑的记录中
当您使用allowadnew
创建一个新记录时,尽管我怀疑InventoryItem.stkItem
字段将为空,或者总是通过PXDefault
属性默认为相同的值。这样做的副作用是总是重定向到同一个图形
正如您可能猜到的那样,allowadnew
没有任何选项或编程接口来影响它的行为,因此它的功能非常有限。出于这个原因,我认为你不能无视它的行为
这使得创建自己的操作按钮成为我所知道的实现用例的唯一选项。您可以设置按钮的样式,使其显示
+
图标,并且不会像AllowAddNew那样显示文本。由于弹出窗口也缺少选项和编程界面,因此您仍然只能将该按钮放置在何处。您好,非常感谢,我现在对如何放置非库存物品有了大致的了解。
[PXPrimaryGraph(typeof(PropertyMaint))]
public class RECOInventoryItem : Audit, IBqlTable
[PXPrimaryGraph(new Type[]
{
typeof(NonStockItemMaint),
typeof(InventoryItemMaint)
},
new Type[]
{
typeof(Where<InventoryItem.stkItem, Equal<False>>),
typeof(Where<InventoryItem.stkItem, Equal<True>>)
})]