Add A Tab Using User-Event Script And Show A Link There To Refer A Suitelet Page

I want to add a new tab in a ‘case record’ of a Netsuite account using user-event script. And, there a link is given. After clicking that link, it will  be moved to another form,which will be created by Suitelet script. And,a sublist will be added in that tab.

There is 3 different types in user-event scripts. Here, I used BeforeLoad type.

nlapiGetContext() API returns nlobjContext object containing information (metadata) about the current user or script context. We can get the current user’s internal id using getUser().

addTab(name, label) is used to add a tab to a form and returns an nlobjTab object reference to the tab. To add an nlobjField object to a portlet and returns a reference to it, addField(name, type, label, source) is used. nlapiResolveURL(type, identifier, id, displayMode) API is used to create a url for suitelet page.

And setDefaultValue(value) is used to set the link which will refer that url to redirect in a suitelet page.

I added a sublist in the new created tab using addSubList(name, type, label, tab)API.

And, add three different fields to that sublist using addField(name, type, label, source).

150 150 Burnignorance | Where Minds Meet And Sparks Fly!