This article explains why an Apex pre-hook or post-hook configured on a Revenue Cloud Procedure Plan appears to run successfully but does not persist changes to Quote Line Item or Quote Line Group fields, and how to resolve it. Customers describe this as: "apex prehook in revenue cloud is not able to set field value", "we have written prehook to update end date on child same as bundle, and value is coming in log for the file, but on TLE for option product, it still shows the old end date", and "Unable to Populate Fields on Quote Line Group Using Apex Post Hook — nothing happens when the procedure plan is run or we run into the error 'Too many DML Statements: 1'". Two distinct failure modes occur. First, the Apex class implements RevSignaling.SignalingApexProcessor and performs direct DML such as update quoteLineItem; or update quoteLineGroup; — the DML either silently has no effect on the TLE because the runtime re-reads pricing context after the hook returns, or it throws "Too many DML Statements: 1" when the hook is invoked inside a context that already issued DML. Second, the Procedure Plan section order places the Apex section between two Pricing sections (for example Apex, Pricing, Apex, Pricing, Apex) which is an unsupported sequence, so debug logs are never created for that hook. This issue affects Revenue Cloud Advanced orgs in Enterprise, Unlimited, and Developer Editions where Salesforce Pricing is enabled and the Procedure Plan Orchestration for Pricing setting is turned on. It is related to Known Issue KI-62584, where discounts applied via Apex hooks may not persist when parent products are modified.
Follow the steps for the cause that matches your scenario. Complete every step before retesting.
Cause 1: Apex hook uses direct DML instead of Context Service updates
1. Open the Apex class referenced by your Procedure Plan in Setup > Apex Classes > [Class Name].
2. Remove every direct DML statement on Quote Line Item [QuoteLineItem], Quote Line Group [QuoteLineGroup], and Sales Transaction Item [SalesTransactionItem]. Direct DML on these records is not supported inside a hook and is the cause of the "Too many DML Statements: 1" error.
3. Replace the DML with Context Service updates. Build a Context.IndustriesContext instance, query the relevant tag (for example SalesTransactionItem or SalesTransactionItemAttribute) with industriesContext.queryTags, modify the tag value in memory, and write it back through the RevSignaling.TransactionResponse object returned by the execute method. Use the ApexDmlAttributePreHook sample in the Revenue Cloud documentation as the reference pattern.
4. Confirm the class signature is global class [ClassName] implements RevSignaling.SignalingApexProcessor and that execute returns RevSignaling.TransactionResponse.
5. Save and recompile the class.
Cause 2: Procedure Plan section order is unsupported
1. Navigate to Setup > Procedure Plan Definitions > [Plan Name].
2. Click Manage Sections and review the order of Qualification, Pricing, and Apex sections.
3. Reorder the sections so that every Apex section is either the first or the last element in the sequence. Supported orders include: Apex, Pricing, Apex; Apex, Apex, Pricing; Apex, Apex, Pricing, Apex, Apex. Unsupported orders include: Apex, Pricing, Apex, Pricing, Apex.
4. Save and re-activate the Procedure Plan Definition. Activation fails with an explicit error if the order is still unsupported — that error confirms you must reorder further.
Cause 3: Procedure Plan Orchestration for Pricing is disabled
1. Navigate to Setup > Revenue Settings.
2. Enable Procedure Plan Orchestration for Pricing.
3. Leave Exclude Default and Sales Transaction Type Pricing Procedures disabled.
4. Save the settings.
Cause 4: Hook is invoked from Apex or Flow with external callouts
1. If your Apex hook performs external callouts, trigger the Place Sales Transaction request from the Salesforce user interface or the Place Sales Transaction API only. External callouts in Apex hooks are not supported when the request is triggered from Apex or Flow, and are not supported when Double Persist mode is enabled.
2. Remove any callouts from the hook if your trigger path is Apex or Flow, or move the trigger to the supported UI/API path.
Verification
Confirm the issue is resolved by opening the affected Quote, clicking Edit Lines to launch the Transaction Line Editor, reproducing the original configuration change (for example adding the parent bundle, or running the post-hook on the Quote Line Group), and verifying that the field updated by the hook (for example the end date on the child option product, or the Description field on the Quote Line Group) now displays the new value in the TLE without a "Too many DML Statements: 1" error.
005385106

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.