are there any features in netsuite that allows num...
# suitescript
m
are there any features in netsuite that allows number sequence generation?
n
Can you specify your use case as to where you want to make this happen?
m
we have a batch/lot number we use for work orders. this however, lives in a legacy system and we'd like to use those numbers in netsuite by preserving the sequence from the old system.
n
You can do this fairly easy. I have done this in the past with Custom Records. Just don't remember how. But I think while creation, it did had some options to include the name field and automatically assign the Id to the name field . Also, you could offset/seed the ID to start from a particular number.
m
ncie one. i was thinking of creating a saved search, sort by internal id so i know which is the last record created and get the batch no field and incremement before saving the newly created work order. think it's an overkill?
n
It sure is an overkill. But in NS, you do have to do such stuff often. I remember dealing with sub-records in such a manner for another use case.
m
"Also, you could offset/seed the ID to start from a particular number." where is this option on custom record? I don't see it
ah numbering - found it. let me see what this allows
👍🏻 1
i am able to generate the numbers as needed in a custom record. created a WF to create the batch no record when a new work order record is created. do you know if it's possible to link the two records and possibly source the id (batch no) on to a field?
n
Create a Parent Child relationship.MArk the Batch Record as Child of WO.
I trust in your abilities to find where that is. Just in case you don't, let me know. I will send a screen-shot. Lol.
m
sorry, requirements changed lol. going to ditch the custom record approach and still with scripting!
😂 1
good to know about the numbering on custom record tho - didn't know that so thanks!
✔️ 1
n
I think you may find the Numbering on the actual Work Orders also instead of Custom Records, Try creating a new form and see if you get something.