Acumatica 2021R2
MySQL 8.0(tested on 5.7 as well)
When publishing this code, it publishes successfully but the database field doesn’t get created. What am I doing wrong?
using PX.Data.ReferentialIntegrity.Attributes;
using PX.Data;
using PX.Objects.AM.Attributes;
using PX.Objects.AM;
using PX.Objects.IN;
using PX.Objects;
using System.Collections.Generic;
using System;
using PX.Objects.EP;
using PX.Data.BQL;
using PX.Objects.CS;
namespace PX.Objects.AM
{
public class AMWCExt : PXCacheExtension<AMWC>
{
//only enable this class if manufacturing is enabled
public static bool IsActive() { return PXAccess.FeatureInstalled<FeaturesSet.manufacturing>(); }
//WorkcenterEmployee field
#region UsrWorkcenterEmployee
//the acumatica database type is PXDBInt
[PXDBInt()]
//set the UI display name
[PXUIField(DisplayName = "Employee ID")]
//set the default value
[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
//the ui control type is a selector
[PXSelector(typeof(Search<EPEmployee.bAccountID>),
typeof(EPEmployee.acctCD),
typeof(EPEmployee.acctName),
SubstituteKey = typeof(EPEmployee.acctCD))]
//define the field
public int? UsrWorkcenterEmployee { get; set; }
public abstract class usrWorkcenterEmployee : BqlInt.Field<usrWorkcenterEmployee> { }
#endregion
}
}
Best answer by Naveen Boga
View original