+ Start a Discussion
ARanjanARanjan 

Need help in formula on quote line item

Hi

 

I am trying to create formula to calculate discount  ((ListPrice - UnitPrice ) / ListPrice) * 100 on quote line item.

I can see ListPrice read only field is there on quote line item still I am getting error ListPrice field does not exist.

 

Or

Is there any waty I can bring discount amount from opportunity line item.

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
MellowRenMellowRen

This may work:

 

(( PricebookEntry.UnitPrice - UnitPrice ) / PricebookEntry.UnitPrice ) * 100

 

Regards

MellowRen

All Answers

MellowRenMellowRen

This may work:

 

(( PricebookEntry.UnitPrice - UnitPrice ) / PricebookEntry.UnitPrice ) * 100

 

Regards

MellowRen

This was selected as the best answer
ARanjanARanjan
Awesome Thanks a lot !

--
*Archana Ranjan*
Salesforce Administrator

Ph: +91 8605017604
Skype ID: enterprisedb_archana.ranjan
www.enterprisedb.com
*
Follow us on Twitter*
@EnterpriseDB

Visit EnterpriseDB for tutorials, webinars,
whitepapersand
more
Denis Augusto ValenteDenis Augusto Valente
As this post is 2 years old, I'm just writing for future references that search for a solution for ListPrice field on QuoteLineItem. 

I think that this solution can cause a problem, in future. As exposed, it work fine if you do not change the prices on your pricebooks. If you change the price on you price list your field on Quote Line Item will be updated. 

If you reference your formula on PriceBookEntry and the value is changed on your pricelist, all legacy quotes will be recalculated. As the field is inaccessible by a formula (I think that it's a bug because you can reference the field ListPrice on OpportunityLineItem), then I suggest to create a new field on QuoteLineItem and record in this field the same value that is recorded in ListPrice. You can do it using a workflow, a flow created by process builder or a trigger. 

Steps:
Create a field ListPrice on QuoteLineItem;
Create a workflow with a field update action, where you update QuoteLineItem.ListPrice__c = PricebookEntry.UnitPrice

In this way, you can refer the field ON QuoteLineItem object, instead you refer directly to PriceBookEntry. In this case, you can update your price book and the values will be kept on Opportuniy Line Item objetct.