Reputation: 43
On Screen FA303000, tab ACTIONS -> Dispose.
I would like to hide the "Before disposal" drop down and define the "Depreciate" action by default. I tried to customize the attributes but without success.
Code :
public class FA_DisposeParams_Ext : PXCacheExtension<PX.Objects.FA.DisposeParams>
{
[PXMergeAttributes(Method = MergeMethod.Append)]
[PXCustomizeBaseAttribute(typeof(PXUIFieldAttribute), "Visible", false)]
[PXCustomizeBaseAttribute(typeof(PXUIFieldAttribute), "Visibility", PXUIVisibility.Invisible)]
[PXCustomizeBaseAttribute(typeof(PXDefaultAttribute), "Constant", "D")]
public string ActionBeforeDisposal { get; set; }
}
Upvotes: 0
Views: 182
Reputation: 1056
You should try setting visibility on initialize in your graph extension. Something like the following:
public override void Initialize()
{
PXCache cache = Base.Packages.Cache;
PXUIFieldAttribute.SetVisible<SOPackageDetail.createdByID>(cache, null, false);
}
Upvotes: 2