Posts

Showing posts from February, 2023

NetSuite: Bypass Drilldowns on Saved Searches With Summary Types

Question: When clicking on a record from saved search results, I'm directed to the drill down. Can I set up the saved search so I am taken to the record directly? Short Answer: Yes, that behavior is possible through the use of formulas. The reason that's happening is because your search likely uses Summary Types on the Results tab. As standard behavior goes, clicking on a record from the summary will take you to the details of the results. If you want a field to take you directly to the record when clicked, you can try the following: Edit the Saved Search Click Results Field : Select Formula (Text) Formula : Enter '<a href= URL '||{internalid}||'">'||{ field_id }||'</a>' Note : Replace URL with the URL of the record, excluding the internal ID. Replace field_id with the actual field ID. Summary Type : Select Group Click Save & Run Example: In a transaction search, Document Number and Name are grouped (Summary Type = Group). The formul...

NetSuite: Conditional Email Templates

When creating Email Templates, Freemarker allows us to use if statements. For instance, you want to create a template that will show the phrase "You may contact us at abc@xyz.com" to the customer, only if the customer's sales rep has an email address, where abc@xyz is the sales rep's email. If the sales rep doesn't have an email address, or if there is no sales rep, then we just show abc@xyz.com. The if statement would look like this: You may contact as via <#if salesrep.email != "">${salesrep.email}<#else>abc@xyz.com</#if>. Moreover, NetSuite does not evaluate what's inside the if tag if the condition has already failed. This is useful information when we encounter compilation errors when attempting to save email templates. If we have confirmed that there is indeed nothing wrong with a template's HTML, the issue must be on the freemarker tags. The error would be a standard one, showing which lines we must look at in source mode...