For instance, assuming you just create a record and want to generate an autonumber for an Account ID - you could either add function to the onLoad/Onsave event so that the function gets executed and saved like this:
function autonumber(){
if AccountID != null
//Generate Account Number
}
But this function only needs to run once, but here it will get executed every time the form loads or saves, which isn't good from a performance perspective, so does anyone have an idea how to get