ANS-0643 · WEB SERVICES & INTEGRATIONS
How to Customize Error Messages in NetSuite Site Builder Dynamic Tags
Learn how to replace generic system error messages with custom text for dynamic tags in NetSuite Site Builder webstores.
Short answer
To customize error messages for dynamic tags in NetSuite Site Builder, utilize the third parameter of the `getCurrentAttribute` function. By providing a string value in this parameter, administrators can define a user-friendly message that will display instead of the default system error when an attribute cannot be retrieved, improving the customer experience.
Scenario
In NetSuite Site Builder webstores, dynamic tags are used to display various item attributes. When an attribute cannot be retrieved, these tags may generate generic system error messages that are not user-friendly. To maintain a professional customer experience, it is often necessary to replace these default error messages with custom, more informative text.
Solution
In NetSuite Site Builder, the getCurrentAttribute function, used within dynamic tags, supports a third parameter for customizing error messages. This parameter allows administrators to specify a default string that will be displayed if the function encounters an error and cannot retrieve the requested attribute.
To implement a custom error message:
Locate the dynamic tag where an error message needs to be customized.
Add a third parameter to the
getCurrentAttributefunction, enclosing the desired custom error message within single quotes.For example, to display "My customer err message" instead of a default system error for an item's store display name:
<%getCurrentAttribute('item', 'storedisplayname', 'My customer err message ')%>This ensures that if the storedisplayname attribute cannot be retrieved, the specified custom message will be presented to the customer.
Expert NetSuite Support
Need help with this NetSuite issue?
Web Services & Integrations consulting and configuration support
