Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
659 views
in Technique[技术] by (71.8m points)

acumatica - Why didn't this field get added to to SOLine table

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.

question from:https://stackoverflow.com/questions/65832007/why-didnt-this-field-get-added-to-to-soline-table

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...