Skip to main content
Solved

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

  • October 25, 2021
  • 2 replies
  • 363 views

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 can be programmatically loaded. 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 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?)

Best answer by markusray17

Depending on exactly the use case you should be able to add your custom script to the /Scripts directory and link to it from your ASPX page.

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+5
  • Semi-Pro III
  • 294 replies
  • October 28, 2021

I would also like an answer to this question. I realize that Acumatica is working on a new UI front end where it will be way easier to work with external javascript libraries: https://www.acumatica.com/media/2021/03/DevCon-2021-Developer-Roadmap.pdf

However, are there any workarounds to get this functionality as things stand today? It could be as simple as exposing an IFrame control where users can run their own webpage inside Acumatica (use existing backend APIs for IO). Is it possible to hack your own ASPX page that is then loaded unmolested by Acumatica?

 

 

 


Forum|alt.badge.img+5
  • Jr Varsity II
  • 237 replies
  • Answer
  • October 28, 2021

Depending on exactly the use case you should be able to add your custom script to the /Scripts directory and link to it from your ASPX page.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings