Activate SuiteCommerce Advanced Extension

When I tried to add a SuiteScript file in the SuiteScript2 folder, I am getting this error while activating the extension.

{“type”:”error.SuiteScriptError”,”name”:”14978″,”message”:”Invalid define call, define should only be called once per module. Define calls found at the following line numbers: tmp_ssp_libraries_ext.js 34, 69, 108, 136, 167, 205, 231, 262″,”stack”:[“createError(N/error)”],”cause”:{“message”:”Invalid define call, define should only be called once per module. Define calls found at the following line numbers: tmp_ssp_libraries_ext.js 34, 69, 108, 136, 167, 205, 231, 262″,”stack”:[“createError(N/error)”,”reduce(/SuiteBundles/Bundle 455185/ExtensionMechanism.Server/CompilersMapReduce/SspLibrariesCompilerMapReduce.js:295)”],”name”:”14978″},”id”:””,”notifyOff”:false,”userFacing”:true}

 

Here is my code:

/**
* @NApiVersion 2.x
* @NModuleScope Public
*/
define(“Adeel.Customization.customization.ServiceController”, [‘N/record’, “ServiceController”], function(
  record,
  ServiceController
) {
  “use strict”;
  return ServiceController.extend({
    name: “Adeel.Customization.customization.ServiceController”,
    // The values in this object are the validation needed for the current service.
    options: {
      common: {}
    },
    get: function get() {
      return JSON.stringify({
        message: “Hello World I’m an Extension using a Service!”
      });
    },
    post: function post() {
      // not implemented
    },
    put: function put() {
      // not implemented
    },
    delete: function() {
      // not implemented
    }
  });
});
Rookie Asked on December 19, 2022 in SuiteCommerce.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor