1

I tried workflow, but I'm stuck on a formula. I've tried a trigger, but stuck again...

can someone tell me step by step where to go and what to do? We are using enterprise addition. They've submitted this request to what I refer to as the Abyss, and it is REALLY hindering my ability to pull reports and jobs. I would GREATLY appreciate any and all help!

I selected "Conversion Completed" (which is the field I created). When it's true, I want it to immediately create the opportunity. A requirement is close date. I wanted to set the date out 30 days from the creation of the opportunity. I'm stuck in writing the formula.

3
  • you can create opportunity from Process builder. If you face any issues, post with specific question where you are facing issues. Apr 18, 2017 at 18:24
  • so I am in Process and I selected "Conversion Completed" (which is the field I created). When it's true, I want it to immediately create the opportunity. A requirement is close date. I wanted to set the date out 30 days from the creation of the opportunity. I'm stuck in writing the formula.. Apr 18, 2017 at 21:04
  • check my answer, if the solves then upvote & accept, so that others can find this useful. Apr 18, 2017 at 21:19

3 Answers 3

1

To set the Close Date, 30 days from creation date, use

Close Date formula as TODAY() + 30

Also, be sure to put the AccountId under which Opportunity is getting created.

Process will look like this:

Opportunity Process

Update based on comments

Name as formula [Account].Name & '-Conversion'

Owner Id, reference Id and use your user Id

0
0

You can easily do it through process builder.

Execute process builder when the Account Record updates, and check if that flag is modified.

0

you can create record on field change in different ways.

trigger AccountTrigger on Account (before update, after update) {
   for(Account objAcc = Trigger.New) {
     if(ObjAcc.Field1 != Trigger.OldMap.get(objAcc.Id).Field1 && ObjAcc.Field1 == True) {  // you can check any condition here
     Opportunity objOpp = new Opportunity (Name ='demo');
     insert objOpp;
    }
   }
}

Reference: https://trailhead.salesforce.com/en/modules/apex_triggers/units/apex_triggers_intro

If you have specific questions, please post with examples.

2
  • Can you tell me where to go to create that trigger? Apr 18, 2017 at 20:47
  • I have updated my answer with link to trail head page. It would help you to learn about triggers.
    – goodForce
    Apr 18, 2017 at 21:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .