HOW TO GET THE TYPE PARAMETER OR RECORD ACCESS MODE IN CLIENT SCRIPT SAVE EVENT?

The Save Record event on a Client-side script does not have the ability to determine the value of the 'type' parameter or Access Mode (create, copy, edit) of a record unlike the Page Init event. The alternative is to make use of a global variable that stores the type from page init function and can then be accessed from save function.


var access_mode = ''; // global variable

function clientPageInitl(type){

access_mode = type; // to read it in before submit
   

}


function clientSaveRecord(){
 alert('access mode = '+access_mode);
     
   

Comments

Popular posts from this blog

Work Around the 1000 Row Limit Returned by Saved Searches in Netsuite

USING CASE (IF AND ELSE) IN NETSUITE SAVED SEARCH- NETSUITE ACADEMY

Understand Core Technology behind SuiteScript 2.0