Fusion Lifecycle – Adding Logic to Advanced Print Views

Fusion Lifecycle allows you to send formatted emails using predefined fields used within the workspace through the Advanced Print View functionality. The functionality has limitations as it can’t perform additional logic on the fields values and it can’t capture transition state change comments to include in the email.

This can however still be accomplished using a predefined Advanced Print View (APV) and a simple JavaScript replace function. Within your APV template, include the string you want to replace as a place holder such as %COMMENTS% or {COMMENTS}. You can then follow-up by replacing the place holder with the actual value.

In the example shown, I’m replacing the %COMMENTS% place holder with the actual comments included during the workflow transition.

        // Send An Email Using An Advanced Print View
        email.to = userEmail;
        email.subject = "This is the email subject";
        email.body = getPrintView("EmailTemplate");
        email.body = email.body.replace("%COMMENTS%", item.workflowActions[0].comments);
        email.send();
        

Let me know if you find this tip helpful. Enjoy!

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Fusion Lifecycle - Adding Logic to Advanced Print Views, 5.0 out of 5 based on 1 rating

Permanent link to this article: http://mycircle.cadtoolbox.com/2019/09/25/fusion-lifecycle-adding-logic-to-advanced-print-views/

Leave a Reply

Your email address will not be published.

* Copy This Password *

* Type Or Paste Password Here *

 
× Shopping Cart

Your cart is empty.