Tuesday, April 23, 2019

Create and redirect to a Quote/Estimate from Opportunity record via Workflow Manager

This sample demonstrates how an Opportunity record, upon save, can be transformed and be directed to an Estimate/Quote record.

1. Create a new workflow by navigating to  Customization > Workflow > Workflows > New.

2. Define the workflow
    a. Name = Create Quote and Redirect
    b. Record Type = Opportunity
    c. Release Status = Released
    d. On Create = True
    e. Trigger Type = After Record Save
    f. Click Save.

3. Create a new workflow instance field by clicking New Field button on the workflow definition.
    a. Label = Quote ID
    b. ID = _quote_id
    c. Type = List/Record
    d. List/Record = Transaction
    e. Store Value = Save

4. To add a workflow state, click New State and set Name = Transform to Quote, then hit Save
5. Click the Transform to Quote state and click New Action.
   a. Click Transform Record.
   b. Trigger On = After Record Submit
   c. Record Type = Estimate
   d. Store Result In = Quote ID (Workflow) // this is the workflow instance field
   e. Click Save.
  
6. To add a workflow state, click New State and set Name = Redirect to Quote, then hit Save.
7. Click the Redirect to Quote state and click New Action.
   a. Click Go To Record
   b. Trigger On = Entry
   c. Record Type = Estimate
   d. ID = Quote ID (Workflow)
   e. Click Save.
  
8. Create a new transition. Select the Transform to Quote state first. Click the New Transition button and then select the Redirect to Quote state.
    a. Transition On = Entry
    b. Click Save.

When automating this process, ensure that there are values mandatory and necessary fields on your Estimate/Quote record.

No comments:

Post a Comment