Skip to content

Instantly share code, notes, and snippets.

@smarenich
Created May 4, 2018 10:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save smarenich/41668eb60d6f6dce0bcce1165245e3eb to your computer and use it in GitHub Desktop.
using System;
using PX.Data;
using PX.Common;
namespace PX.Objects.CS
{
public class MyAutoNumberAttribute: PX.Objects.CS.AutoNumberAttribute
{
public MyAutoNumberAttribute(Type doctypeField, Type dateField)
:base(doctypeField, dateField)
{
}
public MyAutoNumberAttribute(Type doctypeField, Type dateField, string[] doctypeValues, Type[] setupFields)
:base(doctypeField, dateField, doctypeValues, setupFields)
{
}
public override void RowPersisting(PXCache sender, PXRowPersistingEventArgs e)
{
base.RowPersisting(sender, e);
string generated = (string )sender.GetValue(e.Row, _FieldName);
generated += "AA";
sender.SetValue(e.Row, _FieldName, generated);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment