Salesforce Asked on December 28, 2021
When using the standard Start Sync button on a quote and having many decimal places in the discount, the Unit Price seems to change on the related Opportunity Line Item (OLI) attempting to be created.
We block (with a validation rule) users from updating Quote Line Items as the values/insertion of them come from our Quoting system which is the source for this. If the OLI is changing on Start Sync
, the start sync
fails.
It seems specific to situations that have discounts/price with many decimal places.
Quote Line Item
Ignoring the obvious to not allow these decimal places to come, I’d like to understand the behavior here.
I added a QuoteLineItem trigger to see what was trying to change and what seems to be occurring is the following:
This, in turn, is syncing back to the Quote Line Item and hitting our validation rule. The other fields seem to be exact. Below is an image of the exact debug statement.
We have no automation on OLI or Quote Line Items.
My expectation would be that the “Start Sync” would simply copy over the Quote Line Item (as is). Even if it does “recalculate” the total price potentially as mentioned here, I’m not sure how they ended up with those numbers since 9.99775% off 133.33 = 120.0269925. Even trying to cut off certain decimals, I can’t find the math that explains it.
I did find documentation regarding OLIs for the following:
If you specify Discount without specifying TotalPrice, the TotalPrice
is adjusted to accommodate the new Discount value, and the UnitPrice
is held constant.If you specify both Discount and Quantity, you must also specify
either TotalPrice or UnitPrice so the system knows which one to
automatically adjust.
However, I’m not sure if the above is coming into play (one being automatically adjusted) as it’s the “start sync” button vs. anything I’m in control over. The documentation on How Quote Syncing Works doesn’t really explain anything other than to say changes on one affect the other.
Is there any documentation or explanation for why “Start Sync” would be changing the values of the Quote Line Item on first sync?
From the support case, a known issue was created. It was fixed in Spring '21.
The issue was specific to having a discount on a quote line item with more than 4 decimal places. Quote sync incorrectly changed the unit price of the corresponding created opportunity line items when you clicked "start sync".
Answered by Kris Goncalves on December 28, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP