AgileApps Support Wiki Pre Release

Part 2: Creating a Document Template

From AgileApps Support Wiki
Revision as of 11:05, 14 December 2022 by Wikieditor (talk | contribs)

In this part of the exercise, you use variables to populate a basic Word template to show an example of creating content quickly. Next, you add a Document Template to the Email Template defined in Part 1.

  1. In Windows Explorer, navigate to the <workshop_dir> folder and open the file Sample_NDA.docx in a compatible editor. This document contains an example “Non-Disclosure Agreement”.
    Notice that this document uses replacement variables similar to the ones you used when you updated the Email Template in the first part of this exercise. When this document is used as a Document Template in webMethods AgileApps Cloud, the “Account” fields will be replaced with values specific to an Order.

    NDA Agreement Template.png

  2. Optionally, you can edit this document to add new variables or change the text.
    To edit a variable reference, do not edit the text directly. Instead, using MS Word document, right-click on the variable, and then select Edit Field from the pop-up menu.

    NDA Template Edit.png

    Then make your edits in the Field dialog that appears:

    MS Word NDA Field Edit.png

  3. Login to webMethods AgileApps Cloud as yourself. Create a new Document Template for the Orders Object:
    1. Navigate to Configuration > Customization > Objects > Orders > Document Templates, and click New Template.
    2. Provide values as shown:

      Objects Orders Document Templates MyOrders.png

    3. Click Save.

      MyOrders Non Disclosure Template.PNG

  4. Re-open the Agent Order Update Email Template. Scroll down to the Attachments section. Click Lookup icon. Check the MyOrders Non-Disclosure Template created above and click Pick Selected Document Templates:

    Attachments Document Template.png

  5. Save the Email Template.
  6. To see an example of a document generated from the 'Document Template:
    1. Create another Order for account Fred Supplies, assigned to the SouthEast region. Provide some Description text and pick a Close Date.
    2. Claim the record and set the Finish Order Setup Task to Complete.
    3. Logout and then login as MyManager.
    4. Look for the new Order and Reject its ManagerApproval Task.
    5. Open the email sent by your manager as a result of the rejected order.

      Email Example with Attachments.png

    6. Open the document (Sample_NDA.docx) attached to your mail to see the order-specific information that replaces the variables in the Document Template:

      MS Word NDA.png

Taking It Further

To extend what you learned in this exercise, use the AgileApps Cloud wiki pages (http://agileappscloud.info/) to learn how to implement custom data preprocessors in your email and document templates.


Previous

Next