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
Andrew Hoban 14Andrew Hoban 14 

Is it possible to decrement the quantity when products are added from opportunity?

Hi,

I was wondering if its possible to decrese the quantity of a product when it has been added from an opportunity.

For example, I have added 'Bowling Green' to a pricebook with an availibility of 3. So if one gets added to when an opportunity is created I would like the availibility tp then be 2. However at the moment the availibility remains the same no matter how many i add to an opportunity.

I am trying to create a booking/reservation system.

Many thanks
Andrew Hoban 
bob_buzzardbob_buzzard
The Force.com workbook has an example of this - its based on an order being placed but will be straightforward to convert to opportunities:

http://www.salesforce.com/us/developer/docs/workbook/Content/workflow_4.htm?SearchType=Stem&Highlight=inventory|Inventory