This topic contains 0 replies, has 0 voices, and was last updated by T.Watz 7 years, 8 months ago.

  • Author
    Posts
  • #9746

    T.Watz

    Hi, I’ve created a workflow that adds a button to sales orders. Clicking that button generates a .xls(xml)-file that is sent through e-mail. I’ve been trying to change it so it gets downloaded instead, but I can’t figure out how to redirect the browser to the url of the file. This is mostly done in a custom workflow action.

    I’ve managed to submit the file and return the URL, but window.location.href = xmlfileURL didn’t work and I can’t get nlapiSetRedirectURL to redirect to the file (external of RECORD/’file’)

    And a “go to record” action in the workflow can’t lead to a file from what I can tell.

    Any suggestions?

    Code:
    var xmlfile = nlapiCreateFile(OrderNumber + ‘.xls’,’XMLDOC’,stringxml);

    xmlfile.setFolder(206205);
    var xmlfileID = nlapiSubmitFile(xmlfile);
    var xmlfileURL = nlapiLookupField(‘file’,xmlfileID,’url’);
    This is a cached copy. Click here to see the original post.

You must be logged in to reply to this topic.