Set Auto-Numbering
Last updated
Last updated
Auto-numbering can be configured for line items upon saving. This feature is particularly useful when managing product options, as it helps to differentiate and organize each line item effectively.
Auto-numbering applies only when saving through the Line Item Editor. It does not apply to Salesforce internal transactions (e.g., API, Data Loader, or manual deletions).
Suppose you are saving opportunity products through the Line Item Editor on the Opportunity detail page, generating a quote from the opportunity, and syncing the updated data back to the opportunity. If the SortOrder field is not properly saved, line items for product options may appear in the wrong order, causing confusion for users. To address this, you can assign auto-numbering to the SortOrder field, ensuring correct ordering during syncing.
In the Relate Objects step of the builder, enter the API name of the SortOrder field in the Auto-Number Field setting.
To display the sort order, add the SortOrder field in the Line Item Editor Setup step.
When you launch the Line Item Editor, you will see auto-numbered values in the Sort Order(SortOrder
) column.
By default, line items are numbered in increments of 100 (e.g., 100, 200, 300). Option line items for bundled products are numbered sequentially under their parent line item (e.g., 101, 102).
For option line items, only the following fields will be displayed in the editor:
Product Name
List Price
Unit Price
Quantity
Total Price
Discount Rate/Discount Amount
This example demonstrates the configuration of a Line Item Editor for Opportunity Products:
Parent: Opportunity
Line Item: OpportunityLineItem
Lookup: PricebookEntry