• RommelPeralta
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hi Guys,


I'm a newbie on Apex code development. Am trying to solve this for days now, I also tried exploring workflow rules and field updates, but I had no success. I hope you can help me with this.

Below is the senario:

 

There are two important custom fields under Opportunity -- Submitted Discount Approval Request & Discount Approved, both of them are checkbox and are uncheked/false by default. 

 

Submitted Discount Approval Request field should be checked before an Opportunity can be submitted for Approval on the Approval History block under the opportunity page. After submission, a new entry on the Approval History block will ask to approve or reject the request. If the manager approves it, the Discount Approved field will become checked/true.

 

Now here's the thing, on the Opportunity products, below are the fields,

Action            Product                                 Quantity Sales Price Discount Amount Total Price Date Line Description

Edit |  DelGenWatt Diesel 1000kW2.00$100,000.00$20,000.00 $200,000.00

 

 

If the Opportunity Discount Approved field becomes checked/true, the Total Price field of Opportunity Products(s) should automatically be updated based on (Total Price - Discount Amount). What happens now is, I need to edit and save the Opportunity product before the changes could take effect.

 

To make the story short, the Total Price should automatically become $180,000.00 after the Discount Approved field of the Opportunity has been checked/true -- this happens when the Submit for Approval is Accepted by the Approver.


Thanks in advance.

Hi Guys,

 

I'm a newbie on Apex Triggers. I need your your help on eliminating a task process using Apex triggers. Below is the scenario. 

 

When a Opportunity Product is entitled for a discount, a request for discount approval is submitted. Once the request is approved, the total price for each product doesn't update. It will only be updated once the product is edited and saved.

 

Is there a way or a code that automates that functionality where the Total Price is updated automatically when the discount is approved?

 

Thank you in advance!

 

 

 

Hi Guys,

 

I'm a newbie on Apex Triggers. I need your your help on eliminating a task process using Apex triggers. Below is the scenario. 

 

When a Opportunity Product is entitled for a discount, a request for discount approval is submitted. Once the request is approved, the total price for each product doesn't update. It will only be updated once the product is edited and saved.

 

Is there a way or a code that automates that functionality where the Total Price is updated automatically when the discount is approved?

 

Thank you in advance!