title: Auto Generate Number in Acumatica
body: <p>I want to create an auto generate number which similar with auto increment for segment ID in Lot/Serial Classes, like in this picture. </p>
  
  <p><a href="https://i.stack.imgur.com/oQppo.png" rel="nofollow noreferrer">Lot/Serial Classes</a></p>
  
  <p>After I check the code, I notice that it uses PXLineNbr</p>
  
  <pre><code>    public abstract class segmentID : PX.Data.IBqlField
      {
      }
      protected Int16? _SegmentID;
      [PXDBShort(IsKey = true)]
      [PXUIField(DisplayName="Segment Number", Enabled=false)]
      [PXLineNbr(typeof(INLotSerClass))]
      [PXDefault()]
      public virtual Int16? SegmentID
      {
          get
          {
              return this._SegmentID;
          }
          set
          {
              this._SegmentID = value;
          }
      }
  </code></pre>
  
  <p>After I try and apply it in my code, the auto generated number doesn't appear. So I was wandering if I miss something else. Thank you in advance</p>