Hi there, I'm working with SCA 2020.1 and I'm tryi...
# suitecommerce
h
Hi there, I'm working with SCA 2020.1 and I'm trying to build an extension to override the default
stripHTML
function in
Backend/Common/Format/Format.ts
that is used by the cases to clear HTML from any case messages. Normally I would tackle this with a simple SuiteScript extension that uses underscore to extend the function and replaces it with my own. However in this circumstance the code is within the SS2 SSP Application, which I've never written an extension for. I've tried a few different things - using
.js
files and/or
.ts
files, with just a basic extension that does nothing except log "test", but I keep getting errors during the extension activation process. I've copied a couple of my extension code attempts in the thread below this message. Any help or guidance on the creation of extensions relating to SS2 would be much appreciated!
Within a
.js
file in a SuiteScript2 folder.
Copy code
define(["require", "exports", "N/Log"], function (require, exports, NLog) {

	"use strict";

	Object.defineProperty(exports, "__esModule", { value: true });

	function CaseStripHTML () {
		NLog.debug({
			title: 'Test',
			details: 'Testing SS2 Extension'
		})
	}

	exports.CaseStripHTML = CaseStripHTML;
});
Within a
.ts
file in a SuiteScript2 folder:
Copy code
import * as NLog from 'N/log';

export class TestExtension {
	public test(): void {
		NLog.debug({
			title: 'Testing',
			details: 'Will this work?'
		})
	}
}
@PabloZ or @Steve Goldberg any thoughts on this? ☝️
p
Nope, never worked with SSP 2.0 customization.
👌 1
s
I haven't had the opportunity to do more than the basics with it yet either. Looking at the code, it seems unlikely that you will be able to do this with an extension, but that's just my 5 minutes glance at it.
😫 1