java中dac类_VS类的新DAC字段

我不得不在Visual Studio项目中创建DAC扩展而不是DAC类进行自定义,因为我必须为少数字段定义下拉值,如果我直接从自定义扩展DAC,我就无法创建它 .

以下是来自Visual Studio项目的带有下拉字段及其值的DAC扩展代码 -

public class SOOrderExtension : PXCacheExtension

{

#region Class DropDownValue

public static class DropDownValue

{

public const string Value1 = "1";

public const string Value2 = "2";

public const string Value3 = "3";

}

#endregion

#region UsrDropDown

[PXDBString(1)]

[PXUIField(DisplayName = "My DropDown")]

[PXStringList(new string[]

{

DropDownValue.Value1, DropDownValue.Value2, DropDownValue.Value3

},

new string[]

{

"One", "Two", "Three"

})]

public virtual string UsrDropDown { get; set; }

public abstract class usrDropDown : IBqlField { }

#endregion

}

这工作正常,它已在SOOrder现有表中创建了新的用户定义字段 . 但是,如果我在此DAC扩展类中添加任何新字段,它不会在SOOrder表中创建新字段,只是在我发布自定义时跳过 . 因此,我需要在自定义中添加一个SQL脚本,以将这些新字段添加到SOOrder表中 .

我不确定这是否是正确的方法 . 理想情况下,如果我在Visual Studio中的DAC扩展中添加新字段,它应该在SOOrder表中创建新字段,就像我将DAC扩展中的新字段直接添加到自定义中一样 .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值