Crow Canyon Software Support Crow Canyon Software Support

  • Support Homepage
  • Community Forum
  • Submit a Support Ticket
  • CrowCanyon.com Website
  • Version Release Notes
Home / NITRO Studio- Custom Actions / Custom Actions – Send Mail – Custom JavaScript

Custom Actions – Send Mail – Custom JavaScript

616 views Less than a minute 0

Applies To

SharePoint On-Premises and Office 365

Description

This article describes sample use cases for using custom JavaScript in Send Mail action in Custom Actions.

Use Case 1

How to remove rows with column placeholders that do not have any value set.

In this use case, we define a mail template with table format that has column name and column placeholder from the list columns in mail template as shown below.

In the above example, columns and column placeholders are used in table cells and we can use below custom script to check for empty column placeholder from the table and then remove the entire row from the mail template dynamically.

update Script with below in the JavaScript code for this use case.

for (var columnName in objData.Dic_ListColumns) {
var ColumnValueElement = $('[name="ccs_control_'+columnName+'_'+objData.CurrentItem.get_id()+'"]');
if(ColumnValueElement && ColumnValueElement.length > 0 && ColumnValueElement.text().trim() == ""){
ColumnValueElement.parent().parent().hide();
}
}
functionCallback();

Sample Ticket with ‘Category’ and ‘Issue Type’ column values are not set:

Sample output when ‘Category’ and ‘Issue Type’ column values are not set:

NITRO Studio- Custom Actions

About supportTeam

View all posts by supportTeam →

Related Articles

  • SharePoint On-premises: Installation of NITRO Office API
  • Active Directory Groups integration with NITRO
  • Import Tickets using NITRO Custom Actions
  • NITRO Studio Workshop: Invoking Web Services using Workflows & Custom Actions
© 2021 Crow Canyon Systems, Inc. All Rights Reserved
  • Terms of Service
  • Privacy Policy
  • www.crowcanyon.com