Jorge Chávez
Jorge Chávez

Reputation: 60

Is it possible to load external js files/libraries into Acumatica?

I'm working on a new Acumatica screen for our company that will require some javascript code to retrieve and display a map object (from ESRI).

This code requires an external .js file that is included to the HTML by the javascript code itself. Everything works fine if I use a blank HTML page to test this.

The problem I have is that when I try using the same code from inside the Acumatica screen, it doesn't load this required external file, and therefore the code does not work properly.

I attempted to load the full .js file code along with my code, but it returned the following error:

error CS8095: Length of String constant exceeds current memory limit. Try splitting the string into multiple constants.

I haven't tried splitting this file into multiple strings (as the error message suggests), because I want to make sure there isn't a cleaner and more professional, direct/right way to do this.

Is it possible to manually import this external .js file into our Acumatica instance, so I can point to it instead? (in case it makes a difference if it's hosted in the same environment)

or, is there any way to make Acumatica able to load external files so we can keep using our current approach? (any setting that may be preventing external files from loading?)

Upvotes: 0

Views: 196

Answers (1)

Robert Waite
Robert Waite

Reputation: 271

I'm not sure i fully understand the question. What comes to mind however is you may be looking to use the PXJavaScript control. I used this link to help get my head wrapped around how to use the control. We had a need to trigger something off with Java Script and the PXJavaScript control got us to the end result we needed. Let me know if this gets you in the right direction?

Dynamically Change Button Color

Upvotes: 0

Related Questions