Question

Auto number fields get incremented unwantedly without the record getting persisted to database.

While trying to create a new record for a custom object through a section list page button, the auto number field for the record gets incremented every time the new form page is loaded.

Similarly, if I switch to expanded view from compact view as well this happens.

Is this an expected behavior. Is there anything that could be done to make sure that the auto number increments only when the record is saved to database and not every time the page loads.

Like 0

Like

1 comments

This is expected behavior for how the auto-number fields work. 

If you're after a true sequential number without gaps, then you'd need to implement something custom to accomplish that. For a no-code approach, you could have a process with a signal of record added that gets a record count and then updates the newly added record with the result.

Ryan

Show all comments