Troubleshooting SuiteCommerce Modal Rendering Issues in Custom Checkout Extensions

 Overview While customizing a checkout flow in SuiteCommerce Advanced (SCA), developers often introduce modal dialogs (like “Change Shipping Address” or “Edit Address”) for a better user experience. However, you may encounter situations where the modals do not appear, or appear broken or frozen — even though they worked previously. This article documents a real-world troubleshooting… Continue reading Troubleshooting SuiteCommerce Modal Rendering Issues in Custom Checkout Extensions

Fix the error {{# each data}} not found in the template.

The error “{{# each data}} not found in the template.” is encountered when creating file for FTP transfer. Solution: It’s the validation to have an each loop specifically for the batch_of_records. To solve the issue, Update the handlebar as below. Also set page size to 1 in Export step and skip aggregation set to true… Continue reading Fix the error {{# each data}} not found in the template.

Offset one day back to the current date.

This need retrieving the current date. Then, you’d subtract the number of milliseconds in 24 hours to get yesterday’s date, formatted as below: {{dateFormat “MM/DD/YYYY” (dateAdd (timestamp) “-86400000”)}} If the current date is 10/18/2024 the output will be 10/17/2024

Remove whitespace in Handlebar Expressions

Whitespace placed before any symbol inside the handlebar expression will cause an error. Correct: {{expression}}{{dateFormat}} Incorrect:  {{ expression}}{{ dateFormat}} // note the leading whitespace Error:  {{expression {{field}} // second set of opening braces seen as new expression

Error in dateFormat handlebar expression when input is empty

Scenario: The below given handlebar expression is used for date format conversion. {{dateFormat “YYYY-MM-DD” custbody_field1 “DD-MM-YYYY”}} An error is encountered when the field1 is empty in NetSuite. Failed to generate field value from template: {{dateFormat “YYYY-MM-DD” custbody_field1 “DD-MM-YYYY”}}. Details: handlebars Helper {{dateFormat}} expects date argument when you have i/p date format. Solution: Modify the expression… Continue reading Error in dateFormat handlebar expression when input is empty

Handle whitespace in Handlebars

Beware of whitespace lurking at the beginning of an expression. Whitespace placed before any symbol inside the handlebars will cause an error. Correct: {{expression}}{{dateFormat}} Incorrect: {{ expression}}{{ dateFormat}} // note the leading whitespace Error: {{expression {{field}} // second set of opening braces seen as new expression

Handlebars to check a checkbox in the destination record, for a specific customer

Here we need to check a checkbox named Wholesale Order in the destination record if the customer in the sales order record is with the ID 255507. So in the Import mapping select the Destination as Wholesale Order and click on the settings option near to that. Select the Field mapping type as Multi-Field Expression… Continue reading Handlebars to check a checkbox in the destination record, for a specific customer