Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.