You need to sign in to do that
Don't have an account?

Trigger for field update on related object based on opportunity stage
I created a custom object budget and create a lookup relationship with opportunity. So one budget lookup field on opportunity and update this field according to close date via trigger. If close date within month of Jan so budget field update as “Jan”. So all Jan close date opportunity come under Jan budget.
My requirement is when any opportunity stage change as close won so opportunities amount should be some and populate on custom field “won amount “ on budget object. Same with open opportunities all open opportunities amount should show on “pipeline amount” custom field.
I think trigger would be good approach but I don’t know how to query. Could you experts help me?

My requirement is when any opportunity stage change as close won so opportunities amount should be some and populate on custom field “won amount “ on budget object. Same with open opportunities all open opportunities amount should show on “pipeline amount” custom field.
I think trigger would be good approach but I don’t know how to query. Could you experts help me?
You need to write a trigger on opporunity. I've written a trigger for your requirement but you need to imporve my code can need to change the field name with original fields.
-Thanks
Ashlekh Gera
Compile Error: Illegal assignment from Boolean to Decimal at line 9 column 20