function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LSKLSK 

auto-number on a conditional basis - need coding assistance

Need to create an auto-number field that only creates an auto-number if a contract is converted to Active - from Draft status.
What code would I use to disable the Auto-code feature until the contract is actually an Active contract?
 
 It's important to the company to keep the numbers in order - instead of ordering every contract entry - regardless of whether is never goes through to become a signed contract and is terminated - or it goes active. Salesforce auto-generates a number I really don't want to use - but if I could keep that as the initial Draft ID number - and assign an Active Contracts only number to Active contracts that would be perfect.
 
Thanks,
LSK