0

Does anyone have an example of doing this via a Trigger? I have no had any luck (or truthfully, been able to FIND help) on how, if Opp is "Closed", to create a record elsewhere (in this case, a new Case tied to the Account).

If someone has links to such working example(s), that would be awesome. I appreciate any guidance offered. I have just enough knowledge to be dangerous on this and cannot trust what I know to do it correctly, and as usual, navigating the developer's site at SF is like a random-order Dictionary or something (to me, at least).

2
  • What have you tried so far? Have you been able to get a trigger to at least fire and verify the stage?
    – Mike Chale
    Jan 14, 2013 at 14:32
  • I have code all over the place that can verify that a value exists/etc. What I am totally stumped on is inserting a record (so I can then populate it with whatever field values I want). It's simple stuff, and as my job continues to make me work 8x5 on Admin duties, I tend not to get as much time to research these simple things. I'm going through the Workbooks from the Dev site right now (the Apex book specifically) in an effort to expand my knowledge. (sigh)
    – AMM
    Jan 14, 2013 at 14:41

1 Answer 1

3

I strongly suggest you to go through Salesforce Developer guide, it should have good working examples to help you. In addition, you can also check various blogs/resources http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf http://success.salesforce.com/questionDetail?qid=a1X30000000IYPmEAO

this one here explains how to insert new record: http://teachmesalesforce.wordpress.com/2011/05/16/trigger-to-create-a-new-record/

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.