1
  • In our managed package, we have a custom object where the Name field is an auto number
  • We're using a flow to create records of that custom object
  • In our trial source org, somebody tested that flow and it failed (error irrelevant)
  • No record was inserted into the database, but Salesforce increased the auto number
  • We now have e.g. REC-0001, REC-0002 and REC-0003 in that trial source org
  • The next record however will be REC-0005 since the auto number was increased
  • Since REC-0004 was never created, it also does not exist in the recycle bin

Is there any way we could get REC-0004 back?

1 Answer 1

2

As per Salesforce help article, the only option seems to be to remove and install the package.

This (updating type to text and back) does not work for Objects installed by managed released packages (because the components below are locked). If you want to restart Auto-Number fields on Objects from a managed released package, you can uninstall the package and reinstall it.

2
  • Thanks for confirming. That means we'll have to install the managed package into a fresh org, copy all the metadata from the old trial source org and then ask Salesforce to make the new system a trial source org. Very painful Commented Jan 26, 2022 at 12:04
  • Why can not you create a new Trialforce Source Organization from your LMA (License Management Application) app? Or why not to backup all metadata (it is in git, right), backup all data (if it is in generators written via code), wipe all that and reinstall package?
    – kurunve
    Commented Jan 26, 2022 at 12:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .