Let say, there is a script(SetValueAtSaveRecord.js) deployed for all records present in netsuite. But, there is a function(SetLocation() ) in that script which should be applied for a particular record(like transaction record). How to do this?

First, we should check the common word comes in the url of that particular record loading page.

Like, in the page of all types of transaction record(sales record,cash sale record,customer payment record,inventory record and all), ‘transactions‘ -this word coms in the url.

So, in the main function SetAtSaveREcord() of SetValueAtSaveRecord.js,

1. first we need to fetch the url of record page (by using document.url),

2. then, we should search for the common word(‘transactions’) in the url,

3. if the word found in the url, means the record is of transaction record,

4. then we will call the function SetLocation() which should be applied only for transaction record.