Symptom
How are Subscription Numbers generated? What determines the format and sequence of csordtelcoa__Subscription_Number__c?
Cause
N/A (informational)
Resolution
Generation logic
Subscription Numbers are system-generated incremental numbers with the following characteristics:
- Format:
{000000000}(9 digits, zero-padded) - Source: Salesforce auto-increments for each new Subscription record
- Sequence: The number depends only on the last assigned number, not on year, product definitions, or other factors
Prefix configuration
The prefix is configurable via Custom Settings:
- Custom Setting:
Orders_Subscriptions_Options__c.Subscription_Number_Prefix__c - Default prefix:
SN-
Change Order behavior
On a Change Order where the product definition record type stays the same, the subscription number is inherited from the replaced subscription and is not regenerated.
How the Number Is Generated
When a new Subscription record is created, the system automatically generates the subscription number by concatenating the configured prefix (default SN-) with a Salesforce auto-number field (Subscription_Number_Sequence__c, format {000000000}).
On change orders, if the replaced subscription's product definition record type matches the new one, the number is inherited from the replaced subscription. Otherwise, a new number is generated.
Additional Notes
- To change the prefix, update the
Subscription_Number_Prefix__cfield in theOrders_Subscriptions_Options__ccustom setting. - The 9-digit sequence is independent of any other attributes; it is purely sequential based on the last assigned number.
Priyanka Bhotika
Comments