Created
May 4, 2018 10:30
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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