Generating sequential Lot #'s in UD field

Edit (after trying for myself) Just checking - what version of Epicor is this? Are these E9 UD fields? We went live on E10 so I don’t have experience of those. My original unedited advice below in case it helps, though …

Having a field named Character2 nearly foxed me, because I’d expect it to be a string, but looking at your screenshot it does seem to be an integer. So I think your solution is in this post:

If this does sort it, you’ll need System.Int32 in place of System.Decimal, otherwise that seems to be the syntax required in some cases.