This topic contains 2 replies, has 0 voices, and was last updated by chanarbon 7 years, 10 months ago.

  • Author
    Posts
  • #1321

    JayDP123

    Hello, if I wanted to import this javascript library: https://github.com/kjur/jsrsasign/bl…est-all-min.js as an AMD compatible file, or as something that SuiteScript 2.0 can work with, is the only course of action to wrap the entire file in a define([],function(){}); function and then specify the objects to return using:

    return{

    var1: var1,

    function1: function1

    etc..

    }

    If that is the case, do I only have to specify those functions and objects to return that will be called directly from my code? So if function1 above calls other functions that I don’t specifically return, I don’t need to specify those ones right?

    Is there another way to import this library that I am overlooking?

    Thanks
    This is a cached copy. Click here to see the original post.

  • #1322

    michoel

    Have a look at the “Custom Modules Examples” section in the documentation, particularly the “Add a non-AMD library” section

    https://system.netsuite.com/app/help…704111062.html

  • #1323

    chanarbon

    More or less, it is porting module into NetSuite using shims on the require.config() and this means that there should be an export object in the non-AMD JS lib.

You must be logged in to reply to this topic.