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
Sid LightningSid Lightning 

Compare price from pricebook entry to price in custom object

Hi,

I have a custom object called PI (child to opportunity), which picks price from pricebook entry.

Now, when a PI is created price gets stamped and wont be revised even if the price in pricebook entry changes.

Price in pricebook entry gets updated from SAP via batch class every morning.

I want to write a batch class which checks, if the price of the product in PI to new price of the product in Pricebook entry ( if any updates)

If the price in Pricebook entry is lower than price in PI, i want to trigger a mail to mail-id specified in Opportunity.


The business rationale is to notify customer about downward revision in price, which can facilitate the deal
 
Sid LightningSid Lightning
Can anyone help me on this please?