Custom Field Not Visible in Edit Mode on Electronic Bank Payments

Solution Navigate to Payments > Setup > Payment File Templates Desired Payment File Template: Click Edit  Entity Reference Fields: Add your field using the below code in preferred location. <refField id=’FieldId’ label=’field label’ mandatory=’true or false’/>change the field ID and label according to your field settings. If it’s a mandatory field set value as true otherwise false. Click Save

Different ways to Concatenate Strings in free Marker

We can achieve this by using + operator OR without operator Without + operator <#assign s = “Hello ${user}!”> ${s} Using + operator <#assign s = “Hello ” + user + “!”> Note : Assume that user is “Big Joe”. In both cases the output will be Hello Big Joe!

To remove all intervening line breaks in a template

Use <@compress single_line=true>…</@compress>  It aggressively removes indentations, empty lines and repeated spaces/tabs . Example: <@compress single_line=true> <#assign users = [{“name”:”Joe”, “hidden”:false}, {“name”:”James Bond”, “hidden”:true}, {“name”:”Julia”, “hidden”:false}]> List of users: <#list users as user> <#if !user.hidden> – ${user.name} </#if> </#list> That’s all. </#compress> OUTPUT List of users: – Joe – Julia That’s all.

Insert another FreeMarker template file into your template.

You can achieve this by using include. Syntax <#include path> or <#include path options> path: The path of the file to include; an expression that evaluates to a string. (With other words, it doesn’t have to be a fixed string, it can also be something like, for example, profile.baseDir + “/menu.ftl”.). Example: Assume /common/copyright.ftl contains: Copyright… Continue reading Insert another FreeMarker template file into your template.

Difference between ?? , has_content , if_exists in freemarker

?? tells if the left hand operand’s value is missing (means it’s null or undefined variable), and gives back false otherwise true (not missing) accordingly. ?has_content is very much like ??, except it also returns false for a 0-length string or empty array, etc.but It doesn’t return false for a 0, boolean false, etc. !… Continue reading Difference between ?? , has_content , if_exists in freemarker

Sent an email containing a bullet-point list

var listtodisplay = (function () {// listitems is an array of string to be listedvar string = “”;lisitems.forEach(function (item) {string += (‘<br>• ‘ + item.toString());});return string;})(); concatenate the above string listtodisplay to the Body of the email.