E10 BPM Beginner

If you have the Adv Print Routing, you can make a Report Style with Break Routing, for the invoice, and call that report from your DD

If you want (or need to do it all in the BPM), you can set the variable using the “Set Argument/Variable” widget with the following code:

Db.Customer.Where( r =>r.Company == callContextClient.CurrentCompany && r.CustNum == ttInvcHeadRow.CustNum).Select( r =>r.EMailAddress).DefaultIfEmpty("").FirstOrDefault()

Need more details than that?

  1. Create a variable in the BPM
    image

  2. Add a Set Argument/Variable widget
    image

  3. Select the variable you created in step 1, and for the expression, enter the code above

  4. Add a Condition widget to check the value of the variable. If it is not equal to ""
    image

  5. In the Email widget, use the Insert -> Scalar Variables to select your variable.
    image

  6. It will now use the value of the variable (which should contain the email address field from the customer)
    image

1 Like