Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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).

share|improve this question
    
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 '13 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 '13 at 14:41
add comment

1 Answer 1

up vote 3 down vote accepted

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/

share|improve this answer
    
Thank you VERY much! –  AMM Jan 14 '13 at 19:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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