Hi everyone, Any alternative to this using SuiteSc...
# suitescript
g
Hi everyone, Any alternative to this using SuiteScript 2.x?
Copy code
define('CustomServiceController', ['Application'],
	function (Application) {
		'use strict'
		Application.on('before:Newsletter.subscribe', function (model, data) {
			try {

						//Code ......
e
Alternative to what, exactly? I think SuiteScript will choke on the named module (
'CustomServiceController'
) and on the
use strict
, but removing those, the rest seems fine
g
I mean if is possible to use the Application.on(..) at a SuiteScript 2 service ?
e
What is
Application
? I assumed it was a third-party library you're using
g
It's from this example at the Service Controller and Backend Model Events section
e
ah I'm not familiar with SuiteCommerce; might try #C29HR0BFG
☝️ 1
g
Thanks Eric, I’ll post it there
1