SuiteCommerce Advanced Event Scripts

My goal was to show a tab for shipping information whenever someone viewed a product in my SCA website. Here is where I started. This is not the real issue, so just make note of the situation.

Shipping tab

In order to make data available to the template that show product detail in SCA, I planned to put it in a custom field that would be defined under product details. This meant one editable field per item in my database.

I wanted to normalize this, having only one copy of my shipping instructions which would show with every product in my store. So I created a custom field and then tried to fill it using an item.BeforeLoad() even script.

I had just returned from SuiteWorld 2018 and one of the sessions I attended on SCA performance mentioned being careful to check the context of user event scripts. You needed to be careful not to run server-side scripts unless you intended for them to run in the web store.

After creating my custom field, coding my item.BeforeLoad() script and making sure it worked in NetSuite, I tested it in SCA. It didn’t work! Why? Next, I reviewed the SuiteCommerce Advance Performance Checklist. Here is an excerpt from page 13 of that document.

SCA Event Scripts

Apparently, user event scripts are not available in SCA for item records!

So for me, it’s back to square one. Create a custom field and fill it for every item record using Mass Update. Dang!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s