Error when attempting to Export Excel Document

5
Hi, I’m pretty sure I’ve followed all correct procedure and documentation around how to generate a new Excel document, but I’m encountering a weird error at the final stage.  - My New export objects are set up - Template generated referencing the correct objects and attributes - MF To create these objects, link them correctly, and pass the object to the Java action ‘GenerateExcelDocument’  - Download document setting to ‘Show file in browser instead of downloading’ is unchecked  - The MF itself all passes, Java action runs successfully, I download the doc, successfully. MF finishes, once it finishes I get ‘An error has occurred’  The latest error that is shown is detailed as follows.  LogLevel : Error LogNode : Client Message : Did not expect an argument to be undefined Error: Did not expect an argument to be undefined    at r (http://localhost:8081/mxclientsystem/mxui/mxui.js?{{%20cachebust%20}}:20:3032) And a bunch of other lines of similar value to this one   I’ve tried playing about with the template itself, changed the association between my root and norm object, create a new file document and pass that to the java action instead of my root object, tried committing all the objects before doing anything. Keep running into the same problem, the microflow finishes fine with all data looking to be intact, and then the error happens after it finishes. I’ve had this problem in Chrome and IE Maybe I need to update the JS? I’ve already updated the XLSReport module   Completely stumped by it, any help would be appreciated! Cheers Adrian
asked
3 answers
23

The issue was due to security (Annoyingly)

I had access rights on the Row objects that I was exporting, but I didn’t have the correct access rights on the file document I was exporting. 

 

Thanks for your guys help

answered
0

One thing that jumps out to me is the fact that the cachebust parameter is not resolving (the {{%20cachebust%20}} line in the error message). Is it possible that you lack the following lines in your index.html:

 

    <body dir="ltr">
        <div id="content"></div>
        <script>
            dojoConfig = {
                baseUrl: "mxclientsystem/dojo/",
                cacheBust: "{{cachebust}}",
                rtlRedirect: "index-rtl.html"
            };
        </script>
        <script>
            if (!document.cookie || !document.cookie.match(/(^|;)originURI=/gi))
                document.cookie = "originURI=/login.html";
        </script>
        <script src="mxclientsystem/mxui/mxui.js?{{cachebust}}"></script>
    </body>

These lines are in the default index.html. Perhaps they were removed? Or, since I see a %20 character in there, is it possible that there is an extra character in the index file?

answered
0

HI Rob, 

your tip about that the Cachebust parameter is not resolving, was the last piece of the puzzle i was missing.

Since in my index.html the parameter it self was named as follows:

<script>
      dojoConfig = {
        baseUrl: 'mxclientsystem/dojo/',
        cacheBust: '{{cachebust}}',
        rtlRedirect: 'index-rtl.html'
      };
    </script>

However the reference were set as:  <script src="mxclientsystem/mxui/mxui.js?{{ cachebust }}"></script>

By removing the spaces and so making the reference really match with the parameters, the issue is solved.

Now this line looks like: However the reference were set as:  <script src="mxclientsystem/mxui/mxui.js?{{cachebust}}"></script>

 

answered