Skip to main content
Hi there,

 

I have a parent/child relationship between an Opportunity and a custom object called "Resource Request".  A Resource request record gets auto-created when the Opportunity reaches a certain Sales Stage.  There will only ever be one-to-one relationship between the Opp and Resource Request record (however, i want the RR to appear as a related list on the Opp, which it does.)

 

I am trying to pass the ID of the Resource Request back to the Opportunity, when the RR gets created.  The reason being that i'd like to include the ID on a VF email template that gets sent from the Opp.  However, i cannot seem to do this via formula field or process builder (On create of Resource Request, update related Opportunity).

 

I cant send the VF email from the Resource Request, as i reference Opp Line Items in the email, and cant seem to get this detail sending the email from the Resource Request.

 

All i need is the Resource Request ID, so that i can have a link to it in my VF email.  Does anyone have any suggestions on how to get this?

 

Thanks in advance!!
2 respuestas
  1. 13 may 2016, 08:00
    Wes, you can do this via a simple Workflow.

     

    1. Setup | Create | Workflows & Approvals | Workflow Rules

     

    2. New Rule

     

    3. Select the Object: Resource Request

     

    4. Evaluation Criteria: created [1ST OPTION]

     

    5. Rule Criteria: formula evaluates to true

     

    6. Formula: 

     

     

    NOT(ISBLANK(CreatedDate))

    and Save the Workflow

     

    7. Add a Field Update as the Immediate Action

     

    8. Field to Update: Opportunity

     

    9. Select the Field to Update via drop down

     

    10. Specify New Field Value : Use a formula to set the new value

     

    11. Enter formula 

    Id

     

    12. Save it

     

    13. Activate the Workflow it

     

    Wes, you can do this via a simple Workflow. 1. Setup | Create | Workflows & Approvals | Workflow Rules 2. New Rule 3. Select the Object: Resource Request 4.

     

     
0/9000