Can someone show me how to pass parameters between...
# suitescript
n
Can someone show me how to pass parameters between a my main SS2.0 script and a custom module. I created this custom module to really be common API function similar to SS1.0 library scripts. I am able to successfully call it but on the custom module side, if I try to return a variable, I never get a value on my main script. Here is the Main script:
Copy code
define(["N/search",
        "../SuiteScript 2.0/JS_Libraries/moment.js",
        "N/ui/serverWidget", 
        "./Test_Library_SS2.0", 
        "N/runtime"
        ], function (se, m,ui, lib, runtime){
	
	
	
	function CM_beforeLoad(scriptcontext) {
		
	
		    	log.debug({
		    		title: "Inside User Event...",
		            details: "Before Load..."
		    			});
    	
		  	    	
		    	var param=15;
		    	var extracted= lib.increment(param);
		    	log.debug({ 
		    		title: "Value from Library script:",
		            details: counter_var
		    			});