
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!!
6 respuestas
Wes,
Correct, a formula will not be able to grab it since there could be more than one child object so the formula can't flow that way (even though you will only have one child record!).You should be able to accomplish this with a workflow rule (this would not be ideal if you had more than one child record, but since you won't this should suffice).
- Create a text field on your Opp.
- Create a workflow rule on RR when the record is created.
- Do a field update as the action and have it update the text field you created on the Opp with the RR ID.
- Then you'll be able to reference the field from the email template from the Opp.
Hope this works for you.