Hi everyone, Any alternative to this using SuiteSc...
# suitecommerce
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 {
Copy code
//Code ......
s
Well, for starters, I don’t think this would be valid SS 2.x. What is it you’re trying to do?
g
Hi Steve, I need to send a request to a Suitelet when the Newsletter.subscribe is triggered
s
OK, well, I think you’re on the right track for a SuiteScript 1 customisation. I don’t think you need to name your custom script after a service controller, as I don’t think you’re creating one. See https://developers.suitecommerce.com/events.html#service-controller-and-backend-model-events for more details