Hi,
I have a dynamic form created using LC Designer. Is it possible to extract the current user details who is viewing the form within the form itself?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Ankit,
If you create a .js file with the following code and put it in the JavaScripts folder under the installation directory of Reader (and/or Acrobat), this is C:\Program Files (x86)\Adobe\Reader 11.0\Reader\Javascripts on my machine and I called my file getIdentityLoginName.js, then any functions defined will become available as global function in your forms JavaScript and will also have access to secure objects like identity. So the code is;
var getIdentityLoginName = app.trustedFunction(function () {
app.beginPriv();
return (identity.loginName);
app.endPriv();
});
And can be called from a form like;
app.alert(getIdentityLoginName());
Regards
Bruce
Views
Replies
Total Likes
Hi,
I beleive you can only do this with a "folder level script", this is a JavaScript file that is installed under the Reader/Acrobat installation.
Is it a possibilty to do this in your scenerio?
Regards
Bruce
Views
Replies
Total Likes
Hi Bruce,
That would be a possibility, yes.
Could you please elaborate?
Thanks.
Ankit
Views
Replies
Total Likes
Hi Ankit,
If you create a .js file with the following code and put it in the JavaScripts folder under the installation directory of Reader (and/or Acrobat), this is C:\Program Files (x86)\Adobe\Reader 11.0\Reader\Javascripts on my machine and I called my file getIdentityLoginName.js, then any functions defined will become available as global function in your forms JavaScript and will also have access to secure objects like identity. So the code is;
var getIdentityLoginName = app.trustedFunction(function () {
app.beginPriv();
return (identity.loginName);
app.endPriv();
});
And can be called from a form like;
app.alert(getIdentityLoginName());
Regards
Bruce
Views
Replies
Total Likes
Thanks Bruce.
It worked.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies