function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger PriceUpdateTrigger on OpportunityLineItem(before insert) { for (OpportunityLineItem oli: Trigger.New){ oli.sales_price__c = oli.sales_price__c - (10/100)*oli.sales_price__c; } }
Please follow below code:-
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
Please use below code :-
trigger PriceUpdateTrigger on Account (before insert) {
for (Account eachAccount: trigger.New){
eachAccount.Product_sales_price__c = eachAccount.Product_sales_price__c - (Discount__c/100)*eachAccount.Product_sales_price__c;
}
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Suraj
i tried that code its not calculating discount still its populating with actual price
Please make sure your trigger is Activated. and also debug in trigger to get exact value
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh