Is there a way to tell if you are opening an existing doc or a new doc during the javascript onload event?
reference below does not work on existing docs but on new docs it does w/o a problem.
When creating the doc I am checking to make sure that I have loaded data from different sources required before I load the page ( data is loaded in an agent run in the webqueryopen event. It retrieves data from db2, and an ldap server.
If any of the fields fail I need to redirect to an error page and do not want to allow this document to be completed. We can not have the ceded data altered.
On your form, place a hidden, numeric computed-for-display field called NewDoc. For its formula, use @IsNewDoc. Make sure the form has “Generate HTML for all fields” checked.
JavaScript can interrogate the value of that field. It will be “1” if true and “0” if not. Note that JavaScript will see the value as text, even though it’s a numeric field.