+ Start a Discussion

Apex Trigger to Populate Custom Fields on Related Object

We use a custom object called Loan and Loans have opportunities.

Loans have custom fields like UPB, Term, Interest Rate, etc..

Opportunities have new UPB, Term, Interest Rate..

I need to write a trigger that would populate the custom fields on the loan with the custom fields on the opportunity when the stage of opportunity = Completed

Thank you for your help!
Best Answer chosen by TTagg

All Answers

Anup JadhavAnup Jadhav
You want the community to write the trigger for you.
Sorry if I have come across like that. 

I am a complete beginner to apex. This is more of a question and clarification as to if this is something that is possible or is close to best practice.

I apologize for asking so straight fowardly. If there is a trigger that is similar or a quick start where I could begin writing the trigger on my own. More or less I'm looking for advice, my apologies again.
Nilesh Jagtap (NJ)Nilesh Jagtap (NJ)
This was selected as the best answer
Thomas Bille RasmussenThomas Bille Rasmussen
It did not come across like that at all. Anup_J is just having a bad day it looks like.

Looking at your problem, you might be able to this with a workflow rules and field update and not have to go down the trigger route. Always good to keep it simple where possible.