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
Serghei SleptovSerghei Sleptov 

Apex Trigger for Custom Object question

Hi Folks,

I have a custom object BOM__C  that is related to Opportunity
There are custom fields: Prod1_Price__C,  Pprod2_Price__Cis in BOM__C is it possble to create a trigger that will update the fields when BOM is crested based on Product Price from the Price Book that is curently selected for the Opportunity?

Thank you,
Serghei
Carlos Campillo GallegoCarlos Campillo Gallego
Hi Serghei,

Have you consider doing it with Process builder instead coding a trigger? I'm sure that you'll be able to do it with a trigger, but I think that Process builder could be an easier approach, and without coding :)

Let me know if I can help you further.

Kind regards,

Carlos.
Serghei SleptovSerghei Sleptov

Hi Carlos,

how can you Process builder to update the fields? I never used it before.

Serghei SleptovSerghei Sleptov
It looks it doesn't allow me to reffer to Pricebook2, Product2 in precess builder