These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Problem creating custom XML attachment with submitForm()

kschwartz
Registered: Jul 14 2009
Posts: 3
Answered

Anyone,

I have learned a good number of things from everyones posts, but have managed to hit the wall on a custom solution whereby I'm trying to create and submit a custom XML file to send to an backend SAP/CRM system.

In my javascript I have managed to create the XML document, and parse it via the XMLData.parse() method. My problem comes in when I try do the submitForm() call using my custom XML object. The code looks like this:

var cXMLDoc = myScript.GenerateXML(cXMLDoc);
var xdData = XMLData.parse(cXMLDoc, false);
var cToAddr = "mailto:<span class="spamspan"><span class="u">mysap</span> [at] <span class="d">work [dot] org</span></span>";
var cSubLine = "Call Report Submit";
var cBody = "See attachment.";
var cEmailURL = "mailto:" + cToAddr + "?subject=" + cSubLine + "&body=" + cBody;
event.target.submitForm({cURL:cEmailURL, cSubmitAs:"XML", oXML:xdData, cCharSet:"utf-8"});

This all works right up to the point where outlook mail pops up and displays the message "Outlook blocked access to the following potentially unsafe attachments: Acr8326.tmp"

I believe outlook has a problem with the attachment file extension. I have not been able to find any parameters for controlling the attachment name. This problem doesn't occur when sending other file format types or if I remove the oXML parameter it creates the file attachment with the .xml file extension as expected.

Has anyone else encountered this issue or is this working for you? Any insight would be very greatly appreciated.

My Product Information:
Acrobat Pro 8.1.2, Windows
kschwartz
Registered: Jul 14 2009
Posts: 3
After a number of phone calls with the product developers, we have a fix! You will need to update to Reader/Acrobat 9.3 to resolve this issue and have the file attached properly.