Has anyone seen an issue in the past where a m/r s...
# suitescript
s
Has anyone seen an issue in the past where a m/r script (concurrency = 2) is creating transactions and some of the transactions are getting created with duplicate transaction numbers or even blank transaction numbers? Auto numbering is turned on along with allow updates. The script is not setting the tranid field at all and it doesn’t always happen; its very sporadic. I have checked and there are no other scripts or workflows deployed on the transaction. I could potentially see duplicates getting created if 2 instances of the reduce function are executing at the exact same time and NS returns the same next sequence number for both, but I dont know how the next sequence number functionality works and if that would really be possible or not. For the blanks, I can’t really think of anything that would cause that.
b
take a look at the warning when you enable override
it allows duplicates
more for your purposes it generates the tranid during record initialization during beforeload vs during submit when it works normally
i believe the duplicated numbers vs blank numbers has to do with when the records are submitted
s
Thanks @battk. Thats what I figured regarding the duplicates. In fact I just tested in the UI and if I initialize 2 new sales order pages without saving it defaults the same document number for each. I still cant quite fathom what would cause the blanks though
b
probably timing involved
im guessing the case of 2 records submitted at the same time is different than 1 submitted after the other
s
I'd still think blanks to be an unexpected state - unless something is actively setting it blank and that's allowed?
b
if you are not setting the tranid, then my recommendation is to use the
Generate Document Number on Save
field
s
That would be great. I have never heard of that field though and I’m not seeing anything in the record browser. Do you have any information on it?
b
s
That should work, thanks @battk!