0
votes

I've created a simple DAC extension on SOLine in a customization project to add a string field.

I went through Code, +, New DAC Extension, and selected PX.Objects.SO.SOLine. When I publish the code below, no errors are reported but the field is not added to the database.

namespace PX.Objects.SO
{
  public class SOLineExt : PXCacheExtension<PX.Objects.SO.SOLine>
  {
    #region UsrABCD
    [PXDBString(10, InputMask=">CCCCCCCCCC")]
    [PXUIField(DisplayName="ABCD")]
    public virtual string UsrABCD { get; set; }
    public abstract class usrABCD : PX.Data.BQL.BqlString.Field<usrABCD> { }
    #endregion
  }
}

I'm not sure I can generate a simpler example so I'm wondering what I've missed.

I was able to add the field by going through Data Access, +, and selecting PX.Objects.SO.SOLine.

1

1 Answers

1
votes

In order to add a new field to the the database. You first need to go to the database section of the customization project, and go to add > Custom Column To Table.

enter image description here

Then select the table you want to add the field to, in your case SOLine, the field name and its data type.

enter image description here

Once the customization project is published the new field will be added to DB. The next steps would be to create a DAC for the extension but that you already completed.