I am using the script below to generate a random number using a button. I need assistance in coding said generated number to save and not change once saved, so the saved document can be opened anytime by any user and the number stays the same throughout.
this.getField("Violation Number").value = util.printf("%06d", Math.floor((Math.random() * 100000000) + 1));