You need to sign in to do that
Don't have an account?
TrimbleAg
Discount line items from the account level
We have a tier discounting level for our dealers that depends on their sales.
My issue is, I want to create a field on our accounts called "Discount Level" and have it so that any time a product is added to a Opp, that it auto applies the discount level to the line item based on the account that is associated.
Any Suggestion?
My issue is, I want to create a field on our accounts called "Discount Level" and have it so that any time a product is added to a Opp, that it auto applies the discount level to the line item based on the account that is associated.
Any Suggestion?
Thanks,
PB
PB,
There are a couple of options (depending on how complex you want to get)
1. Add a trigger to the Opportunity Product. The idea here would be that when the user saved the Opportunity Product, the Trigger would go to the parent Account, pull the discount level, and then apply the discount to the Opportunity Product UnitPrice. The (un bulkified) code would look like:
2. Replace the Opportunity Product creation page with a VF page. This is much more complex and would require a design of the Opportunity Price Book selection Page as well as the Opportunity Product Lookup. The advantage is that you could do a lot more such as to actually display the Account Discount, and allow the user to override the discount.
Hope this helps.
Jay
All Answers
PB,
There are a couple of options (depending on how complex you want to get)
1. Add a trigger to the Opportunity Product. The idea here would be that when the user saved the Opportunity Product, the Trigger would go to the parent Account, pull the discount level, and then apply the discount to the Opportunity Product UnitPrice. The (un bulkified) code would look like:
2. Replace the Opportunity Product creation page with a VF page. This is much more complex and would require a design of the Opportunity Price Book selection Page as well as the Opportunity Product Lookup. The advantage is that you could do a lot more such as to actually display the Account Discount, and allow the user to override the discount.
Hope this helps.
Jay
Hey Jay,
I will probally use #1, like you said its the easier method, but like idea #2 design.
Thanks for the help!
Pat