Expand my Community achievements bar.

SOLVED

Can't Access the doc Object

Avatar

Level 2

Hello there

I am unable to access the doc object, as in doc.mailForm().

I have tried accessing this object in the following ways, from a field event and a global module:

this.doc (undefined)

app.doc (undefined)

event.target.doc (undefined)

doc (crashes JavaScript).

The app object is OK, as I can use app.alert().

I am using Designer version 8.2.1, using a dynamic XML form.

1 Accepted Solution

Avatar

Correct answer by
Level 10
Just use event.target which will return the doc object.
see sample code below
doc.print();
doc.saveAs();
doc.closeDoc();

Nith

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10
Just use event.target which will return the doc object.
see sample code below
doc.print();
doc.saveAs();
doc.closeDoc();

Nith