Here’s an example of how you can split the class value and retrieve the child class in an advanced PDF template using the split() method in SuiteScript, which is the scripting language used in NetSuite:
To accomplish this task, you can utilize the split() method to separate the class value based on a specified delimiter. By doing so, you can easily access and extract the child class from the resulting array
<#-- Splitting the class value using ":" -->
<#assign classArray = classValue?split(":")>
<#-- Retrieving the child class -->
<#assign childClass = classArray[classArray?size - 1]>
<#-- Removing leading and trailing whitespace from the child class -->
<#assign trimmedChildClass = childClass?trim>
<#-- Outputting the trimmed child class value -->
${trimmedChildClass}
Note: If the class name contains a “:” character, this logic may encounter an error.