You need to create a folder level JavaScript to obtain the identity's object properties during the initialization of the application. This code will need to be included on each salesman system. You can even create your own identity property. You will also have to have all your salesman complete the identity options for their version of Acrobat/Reader
You will also need to create a form ready script to check a selected identity property, like the 'corporation'. You can check this value to see if it matches your corporation value or your selected value. This document ready script can then lock or unlock the fields bases on the results of your test. Users outside of your organization will not have the folder level script, so be prepared to trap this error, or they will not have the same corporation property.
The following JavaScript code defines a trusted function to obtain the passed identity property:
// folder level JavaScript to obtain the properties from the identity object
trustedIdentity = app.trustedFunction( function (sProperty) {
// function to return the passed identity property
var iProperty = '';
app.beginPriv(); // explicitly raise privilege
iProperty = identity[sProperty];
app.endPriv();
return iProperty;
}) // end of trustedIdentity function definition
The following code shows how to obatin the various properties in a PDF form.
// JavaScript to use the trustedIdentity function:
// get value of 'corporation' property by calling the 'trusetedIdentity' function
var myCorportaion = trustedIdentity('corporation');
console.println('corporation: ' + myCorporation); // display result
console.println('email: ' + trustedIdentity('email') ); // get email
console.println('loginName: ' + trustedIdentity('loginName') ); // get login name
console.println('name: ' + trustedIdentity('name') ); // get name