1
0
-1

We are saving the Form Data to Transaction Manager. And the PDF Receipt is getting generated on the TM. If I need the PDF File on the Front End( for example the Form Data needs to be saved as PDF File). How can I access it. I am trying to use Local Save Button. But it does not show up on the Screen.


    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Thank you Miro for the quick response.

      I tried accessing the PDF Format of the Form using the above Javascript on the Button Click. But getting the following error. I can see the PDF File on the TM1 generated receipt link.

      https://avokatmdev.company.com/manager/servlet/FormReceipt.pdf?submitKey=ddbacc72a25d67f97a9734842f8bac9a#zoom=100

      But when I generate the link using the above code the link generated is https://avokadev.company.com/us1-demo/servlet/FormDynamicDataServlet?sfmRequestKey=f92d4f0b0d520d8d27cdf31e5a011df0&sfmOperationName=renderReceipt with the below error.

      What am I missing here?

      Thanks in advance,

      Ramya

      1. Miroslav Botka

        Hi Ramya,

        I just noticed your other question where you state that you are using quite an old TM version 4.0 ? 

        What is the best approach to create a Client to call a REST Webservice? Using Transaction Manager or Java Script in Composer?

        The code above I provided was from a recent Composer form version which expects a newer TM version. It seems that your TM version doesnt support the renderReceipt operation yet and hence you'd need to built the render receipt URL for TM 4.0 like the first one in your previous message (https://avokatmdev.company.com/manager/servlet/FormReceipt.pdf?submitKey=ddbacc72a25d67f97a9734842f8bac9a#zoom=100).

        1. update the JS to built the ("..../servlet/FormReceipt.pdf?....") receipt render URL 
          1. get the TM server URL using the same phase variable - "DynamicDataServiceURL"
          2. remove the "FormDynamicDataServlet" part from it
          3. add "FormReceipt.pdf?...."
          However I cant ensure you'll be able to generate Saved submission's receipts. If I remember right the support for this was added in one of the 4.x versions (I might be wrong and there wont be any issue)
        2. As Ben W pointed out, I too strongly recommend to upgrade your TM envs to the latest GA Transact version.
          Note that Transact 17.10.1 has just been released (its one major version higher than 5.x.x)

        cheers

        Miro


      2. Ramya Tata

        Thanks Miro,

        I thought so, that the version is not supporting. I tried what you have suggested to replace 'FormReceipt.pdf'. But that does not help. I tried below two ways. Can you suggest any other possibility that I can try with current version. We have plans to move to next one. But for now I need to work with the existing.

        1. Is there a possibility of getting the SubmitKey from the SubmissionDataBean that gets processed on Submit/Save Key of the Form?
        2. TM Already connects to TXMANAGER Schema where all the SubmitKeys are saved. Can I read the SubmitKey from that DB into my DDS and populate the latest SubmitKeys for each Form?
        3.  I saw a 'Local Save Button' which describes as Save as PDF File in the Composer Widgets. When I try to use it. It does not even show up on the WebPage.

        Thanks so much for your help.

        Ramya

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hi Ramya,

      TM should be able to generate and provide a PDF receipt in the Saved form status at anytime using the download web receipt servlet url. Its the same one you can normally see on the form's submission confirmation modal page (actually a button's JS code - bellow).

      To construct the URL dynamically you can use the same code already in all forms by default (if not customized via datapacks) as seen in the picture bellow. I am wondering whether you could just programaticaly click the same button which would do the entire job for you (smile) without much of coding.

      cheers

      Miro


        CommentAdd your comment...