添加自定义功能复选框未显示在自定义功能UI中,我的发现
var featureAttributes = cache.GetAttributes(null, field).OfType<FeatureAttribute>();
给出0个featureAttributes,这就是为什么当我按照文档中的建议添加了具有适当标签的Features.xml文件时,它不可见,我还缺少其他东西吗?
public sealed class FeaturesSetExtension : PXCacheExtension<PX.Objects.CS.FeaturesSet>
{
#region UsrMyNewFeature
public abstract class usrMyNewFeature : PX.Data.BQL.BqlBool.Field<usrMyNewFeature> { }
[Feature(false, DisplayName = "MY NEW FEATURE")]
public bool? UsrMyNewFeature { get; set; }
#endregion
}
我得到以下结果:
您将创建一个Feature.xml文件,然后限制与新功能开关相关的页面。
如果您需要访问开关(在添加到features.xml中之前可能无法注册:]
PXAccess.FeatureInstalled<FeaturesSetExtension.usrMyNewFeature>()