• pratik.prusty1.3926473648707793E12
  • NEWBIE
  • 0 Points
  • Member since 2014

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

OK so I've been an admin for about 3 years and (for better or worse) know more about SF than anyone in my company.  i have some experience with apex and Visualforce, but little with triggers.

 

what i need is to write a trigger in production that does this:  the trigger should create a new record in a custom object called "Vehicles" when an Opportunity record is created with a specific value in one of its custom fields (the field is called "Type").  So, when an opp is created and saved with Type = "x", then the trigger should fire, and a new vehicle object record should be created that is populated with a few fields from that opportunity record.

 

can anyone send me some code to show me what this trigger should be or look like?  I've been researching this but have no clue, and I'm afraid of writing bad code that will cause problems.

 

also, the custom object is not in a parent-child relationship with the opporuntiy object, and i don't want it to be unless it has to be.

 

i know the developers in here are ridiculously smart and talented, and i'm just hoping one of you feels sorry enough for an amateur like me to help me out.  thanks a lot.