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
krishna guptakrishna gupta 

when i was trying to clone the OpportunityLineItems and assigning to other opportunity, i am getting the below error.


Sales Price: field integrity exception: UnitPrice (only one of unit price or total price may be specified)
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: UnitPrice (only one of unit price or total price may be specified): [UnitPrice]
Best Answer chosen by krishna gupta
ManojSankaranManojSankaran
Dear Krishna,

Below are the possible reason.

1. We are assigning values to both Unit Price and to Total Price. (Calculate only one value)
2. Or both the values are Null.

Check this and let me know if it solves your problem. If it is not working kindly post the code snippet.


Thanks
Manoj S
Total Price Vs Unit Price

All Answers

ManojSankaranManojSankaran
Dear Krishna,

Below are the possible reason.

1. We are assigning values to both Unit Price and to Total Price. (Calculate only one value)
2. Or both the values are Null.

Check this and let me know if it solves your problem. If it is not working kindly post the code snippet.


Thanks
Manoj S
Total Price Vs Unit Price
This was selected as the best answer
krishna guptakrishna gupta
Thanks Monoj, it is working now.
ManojSankaranManojSankaran
Kindly mark this as an anwer.If you agree...