This topic contains 6 replies, has 0 voices, and was last updated by abaig 10 years, 4 months ago.

  • Author
    Posts
  • #4696

    vboothe

    I add a local file or project in the include path on the Javascript resource but get a reference error each time I try to call the method in the library. Any ideas on how to get references to work?
    This is a cached copy. Click here to see the original post.

  • #4697

    abaig

    Hello,

    Just to clarify, have you added the libraries in your build path. If not:

    – Right-click on the project

    – Navigate to Build Path > Configure Build Path

    – Include your files in there

    Thank you

  • #4698

    vboothe

    Yes, did this work for you? Build Path is missing from my project “right click” menu. Hmmm.

  • #4699

    abaig

    Hello,

    Not a problem, there are other ways to get to the same settings.

    – Right-click on the project

    – Click Properties

    – Click on Java Build Path

  • #4700

    vboothe

    Thanks but there is no build path. If I right click on the project, select properties then there is no Java Build Path. Only Javascript/Include Path which I added js files to and still the functions are not getting accessed by the js files in my project. (Reference error). This is the SuiteCloude IDE. Curious that you use a java build path for Javascript.

  • #4701

    abaig

    Hello,

    I apologize I was looking at the Java Project when I gave you the path. For Javascript you have the right path. May I ask if you are trying to run the code in the IDE or are you uploading your code and trying to run it.

    If you are uploading the code, it seems like the libraries are not being included. In this case:

    – include the code from your libraries to your original code

    – include your libraries and your script in an HTML page

    Thanks

  • #4702

    abaig

    Hello,

    Just to word it in a different way:

    – I tested the upload and download of the projects from SuiteCloud IDE to NetSuite. The upload to NetSuite from the IDE created a new folder in the file cabinet (with all the files that were contained in the Project form IDE).

    – Since Javascript you cannot include the libraries in the code itself, you have two options

    => include the code from your libraries to your original code or use an HTML page

    => include the downloaded files from the file cabinet in the libraries tab on the script record

    Thanks

You must be logged in to reply to this topic.