例如,如果我选择AttributeID
作为COLOR
并且它具有控制类型Combo
,那么Default Value
字段将变为Drop Down
。如果我选择AttributeID
作为CONFIGURAB
并且它具有控制类型Text
那么Default Value
变为Text
。
请检查下面的图像(组合,文字)
我创建了一个New Screen
并试图在Attribute
Tab中获得相同的东西。 Default Value
字段不会根据AttributeID
选择动态变化
以下是我在“新建屏幕”中使用的DAC字段
#region AttributeID
public abstract class attributeID : PX.Data.IBqlField
{
}
protected string _AttributeID;
[PXDBString(10, IsUnicode = true, IsKey = true, InputMask = ">aaaaaaaaaa")]
[PXUIField(DisplayName = "Attribute ID", Visibility = PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(CSAttribute.attributeID))]
public virtual string AttributeID
{
get
{
return this._AttributeID;
}
set
{
this._AttributeID = value;
}
}
#endregion
#region DefaultValue
public abstract class defaultValue : PX.Data.IBqlField
{
}
protected string _DefaultValue;
[PXDBString(255, IsUnicode = true)]
[PXUIField(DisplayName = "Default Value")]
[DynamicValueValidation(typeof(Search<CSAttribute.regExp, Where<CSAttribute.attributeID, Equal<Current<TSOrderTypeAttribute.attributeID>>>>))]
public virtual string DefaultValue
{
get
{
return this._DefaultValue;
}
set
{
this._DefaultValue = value;
}
}
#endregion
看起来您正在尝试将Attribute支持扩展到新的自定义实体。如果是这样,请参考这个KB article。