```/** * @NApiVersion 2.x * @NScriptType UserEve...
# suitescript
a
Copy code
/**
 * @NApiVersion 2.x
 * @NScriptType UserEventScript
 * @NModuleScope SameAccount
 */
define([],

function() {
   
    /**
     * Function definition to be triggered before record is loaded.
     *
     * @param {Object} scriptContext
     * @param {Record} scriptContext.newRecord - New record
     * @param {string} scriptContext.type - Trigger type
     * @param {Form} scriptContext.form - Current form
     * @Since 2015.2
     */
    function beforeLoad(scriptContext) {
    	scriptContext.form.clientScriptFieldId = 1753729; // client script field internal ID
    	scriptContext.form.addButton({
    		id: 'custpage_getstickercsv',
    		label: 'Download CSV for Stickers',
    		functionName: 'downloadStickerCSV'
    	});
    }

    return {
        beforeLoad: beforeLoad
    };
    
});