ANS-0824 · SUITESCRIPT DEVELOPMENT

How to Implement Custom CSS with Images in NetSuite Client Scripts?

This guide outlines the process of integrating custom images into NetSuite client scripts by leveraging the File Cabinet and SuiteBundler.

Short answer

To use custom images in NetSuite client scripts, store them in the NetSuite File Cabinet and make them available without login. Modify your CSS to reference these image URLs. This approach allows for bundling the customization, ensuring images are correctly displayed within your NetSuite environment.

Scenario

NetSuite users often require custom styling, including the use of specific images, within client scripts to enhance user interface or branding. The challenge lies in properly hosting these images and ensuring they are accessible and correctly referenced by custom CSS within the NetSuite environment.

Solution

The recommended approach for incorporating custom images into NetSuite client scripts involves the following steps:n

  1. Place the required images in the NetSuite File Cabinet.n

  2. Ensure these images are configured to be 'Available Without Login' to allow public access.n

  3. Modify the custom CSS to point to the URLs of these images.n

  4. Bundle the entire customization, including the images and CSS, using SuiteBundler for deployment.

    This method ensures that images are properly hosted, accessible, and integrated into your NetSuite customizations.

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant