Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Question on importDataObject

$
0
0

I created a button and on the click event, put this code in -

 

 

 

var oAttachments;

var myDoc = event.target;

var attResult;

 

 

try

{

          xfa.host.messageBox("removing data object");

          myDoc.removeDataObject("test");

          xfa.host.messageBox("removed data object");

          xfa.host.messageBox("importing data object");

          attResult = myDoc.importDataObject("test");

          xfa.host.messageBox("attResult value :"+attResult);

          xfa.host.messageBox("Successfully attached document");

          form1.Page1.num.rawValue = form1.Page1.num.rawValue + 1;

          if (form1.Page1.num.rawValue >= 1 )

          {

                    form1.Page1.Attached.presence = "visible";

          }

}

catch (err)

{

          xfa.host.messageBox("Issue attaching file!");

          xfa.host.messageBox("attResult value : "+attResult);

}

 

I am having a couple of issues :

1. for both removeDataObject and importDataObject, the code goes to the catch block - why?

2. when I go back into to designer this snippet of code disappears from the click event ????

 

FYI - I Reader Enable to document, so that is not the issue. Any thoughts?


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>