JavaScript Error in 365 BC WebClient

pompadipompadi Member Posts: 1

i'm new in connecting JavaScript and AL, so I hope you can help me:

i wrote a little JavaScript/ HTML CardPage Connection to viaualize some data.

So this is my Code, it's working perfect in my SandBox, but in Production Enviroment i get the Error: Cannot set property 'innerHTML' of null.

So my major question to you is: what is the difference between live enviroment ControlAddin Settings and Sandbox Settings.

<!DOCTYPE html>
        <script src="bar.js"></script> 
  <div id="chart" bar chart here</div>



(function ($) {
    $(document).ready(function () {
        var url = Microsoft.Dynamics.NAV.GetImageResource("test.html");
        Microsoft.Dynamics.NAV.InvokeExtensibilityMethod('Ready', '');

 var ControlBusinessGroupsMonthly;

function GoBusiness (bus, j, s){

var data = [
  {label: bus[0], 
  value: s [0]

for (var i = 1; i < j; i++){

  var dataCon = [
    {label: bus[i], 
    value: s [i]
   data= data.concat(dataCon);

// Chart Specifications
var targetId = 'chart';
 var canvasWidth = 660;
 var canvasHeight = 500;

var chart = new BarChart(targetId, canvasWidth, canvasHeight, data);

so, pretty simple, but not working.... Any Idea?
Thanx so much :)
Sign In or Register to comment.