Quantcast
Channel: PLM – CADToolbox.com
Viewing all articles
Browse latest Browse all 26

Fusion Lifecycle – Adding Logic to Advanced Print Views

0
0

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!


Viewing all articles
Browse latest Browse all 26

Latest Images

Trending Articles





Latest Images