In OneWorld, I know you can have a subsidiary-spec...
# general
j
In OneWorld, I know you can have a subsidiary-specific prefix before AutoNumbered transactions but is it possible to do something similar for custom records using AutoNumbering, or do I have to save the record, then reload the newly created custom record in order to manipulate the record name afterwards?
s
I doubt you can do that for custom record numbering. Only options are there fixed PRE and SUFFIX for numbering not by subsidiary though. Theoretically it can be done using script up save - will add sub prefix to the numbering.
j
I guess there’s no way to know the numeric part before save tho
s
come to think about it 💡- create a custom field to hold the sub prefix (sourced from sub and inline/disabled) - then concat that value with document # in another field just by using formulas and show it as document number - no scripting may be needed theoretically 🤔
FYI my brain is quite twisted LOL
j
I like it lol
the
name
field for this custom record type is pretty ubiquitous in our system though so really I need it to be set to the desired thing
Interesting…
let myrec = record.create({type: ‘customrecord_my_record’}); myrec.setValue({fieldid: ‘name’, value: ‘testname’}); let myrec_id = myrec.save(); // here, the record is autonumbered, name is NOT ‘testname’ let r = record.load({type: ‘customrecord_my_record’, id: myrec_id}); r.setValue({fieldID: ‘name’, value: ‘testname’}); r.save(); // NOW the name is ‘testname’
even though I can override, I can only override AFTER it’s saved at least once.
dull