【发布时间】:2018-01-16 23:15:36
【问题描述】:
我有一个自定义 DAC 来保存物品的不同分店价格。
当我尝试保存库存项目时,我收到“指定的演员表无效”错误:
我不确定 Branch 属性之一是否有问题。
这是我的 DAC
using System;
using PX.Data;
using PX.Objects.IN;
using PX.Objects.GL;
namespace SalePriceByBranch
{
[Serializable]
public class INItemPriceByBranch: IBqlTable
{
[PXDBInt(IsKey = true)]
[PXUIField(DisplayName = "Inventory ID")]
[PXParent(typeof(Select<InventoryItem, Where<InventoryItem.inventoryID, Equal<Current<INItemPriceByBranch.inventoryID>>>>))]
[PXDBDefault(typeof(InventoryItem.inventoryID))]
public Int32? InventoryID { get; set; }
public class inventoryID : IBqlField{}
[PXDBInt(IsKey=true)]
[PXUIField(DisplayName = "Branch")]
[PXDefault(0)]
[Branch()]
public Int32? BranchID{ get; set; }
public class branchID : IBqlField{}
[PXDBDecimal(4)]
[PXUIField(DisplayName = "Unit Price")]
[PXDefault(TypeCode.Decimal,"0.0")]
public Decimal? UnitPrice { get; set; }
public class unitPrice : IBqlField{}
}
}
我认为 BranchID 上的错误是一个红鲱鱼。这是错误跟踪:
有什么想法吗?感谢您的回复!
【问题讨论】:
-
您输入分行名称吗? (上例中为 AKL,MAIN。)如果不是,它们是如何设置的?
-
可以直接输入,可以。但它也可以弹出分支查找对话框。
标签: acumatica