You need to sign in to do that
Don't have an account?
Masie Maseli
trigger to update value using formula
Hi
I have a very simple trigger to update a few fields based on a formula field but its not updating. The trigger assist in showing the values of the formula field on the edit screen of my quote line items. Can someone please help.
I have a very simple trigger to update a few fields based on a formula field but its not updating. The trigger assist in showing the values of the formula field on the edit screen of my quote line items. Can someone please help.
trigger UpdateFieldsFormula on QuoteLineItem (before insert, before update) { for(QuoteLineItem q:trigger.new) { q.Quantity_on_hand__c = q.Product_Quantity_On_Hand__c; q.Cost_Price__c = q.Product_Cost_Price__c; q.In_Stock_Price2__c = q.In_Stock_Pricing__c; } }
Please use below code .
Above code should work on befor insert also..can you tell the type of the fields where you are assigning the values...because for me this same kind of scenario is working...I am abl eto update the feilds from formula firld on before insert..
Thanks
Thanks for the suggestion but I still have the same problem- after selecting the products on the Add Quote Line Item screen the fields do not update please see the picture attached.