Best Practices to Avoid in SuiteCommerce Development

Avoid extension practices in SuiteCommerce that lead to instability. Use the Extensibility API to ensure your customizations remain stable.

·2 min read·View Oracle Docs

TL;DR Opening

When developing extensions in SuiteCommerce and SuiteCommerce Advanced, it's crucial to avoid certain practices that can lead to unstable and non-sustainable outcomes. This guide outlines key practices to steer clear of during your development process.

Practices to Avoid

Understanding what not to do can be as important as knowing what to do. Here are two key practices to avoid when working with current SuiteCommerce releases:

Do Not Extend the childViews Property

Adding a child view by extending the childViews property can lead to issues in stability and maintainability. Although this method was common in older versions of SuiteCommerce Advanced (SCA), current SCA versions with support for the Extensibility API make this practice obsolete.

  • Risk: This approach requires including your view as a dependency in your file, which can violate core modules' restrictions.
  • Best Practice: Utilize the Extensibility API to ensure that your customization is sustainable and compatible with future updates.

Avoid Customizing Theme Templates

For sites utilizing managed themes, direct modification of theme files is prohibited. Customizing a theme’s template files to add functionality compromises the stability of your site. Instead, use extensions to introduce new content without altering existing functionality.

  • Focus: The best practice is to enhance user experience without tampering with the underlying code. This method not only preserves your changes across different site versions but also promotes a cleaner and more manageable codebase.

Conclusion

Adopting best practices in SuiteCommerce development not only increases stability but also ensures that your enhancements remain functional across various updates. Always refer to the Extensibility Layer Safe Mode and the guidelines provided for the safest approaches to handling extensions.

Source: This article is based on Oracle's official NetSuite documentation.

Key Takeaways

  • Avoid extending the childViews property for stability.
  • Do not customize theme templates in managed themes.
  • Utilize the Extensibility API for sustainable customizations.
  • Implementing best practices ensures compatibility with future updates.

Frequently Asked Questions (4)

Can I extend the 'childViews' property in SuiteCommerce Advanced?
No, extending the 'childViews' property can lead to issues with stability and maintainability in current SuiteCommerce Advanced versions. Instead, use the Extensibility API for safer customizations.
Is it safe to customize theme templates in managed SuiteCommerce themes?
No, customizing theme templates in managed themes is not recommended. It compromises site stability. Use extensions to add new content without altering existing functionality.
What are the risks of including a view as a dependency in your SuiteCommerce file?
Including a view as a dependency can violate core modules' restrictions, leading to potential instability and maintenance challenges. It's best to use the Extensibility API for adding customizations.
How can I ensure my SuiteCommerce customizations are sustainable across updates?
Use the Extensibility API and adhere to the best practices outlined in the guidelines. This approach ensures your enhancements remain functional and compatible with future updates.
Source: Practices to Avoid Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →