Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Question on importDataObject


Level 2

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

var oAttachments;

var myDoc =;

var attResult;



"removing data object");


"removed data object");

"importing data object");

          attResult = myDoc.importDataObject("test");

"attResult value :"+attResult);

"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)


"Issue attaching file!");

"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?

0 Replies