Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enterprise Scan: Message delivered when using validation.fail

Status
Not open for further replies.

apbaman

IS-IT--Management
Mar 8, 2005
6
US
In an Indexing field Validation script, I am performing a database lookup to validate the user's entry. When the entry fails the validation, I want to deliver an error message, flag the field, and not let the archival continue (that is, I want to force the user to correct the data).

I am using the following:
Validation.Fail("No Records Found For " + AGNUM + "; Please Enter Valid Agreement Number, then press Tab");

When the entry fails, the field is flagged and archival stopped, just as desired.

However, the resulting message box is:
Validation Fail
Exception has been thrown by the target of an invocation.
No records found for [AGNUM]; Please Enter
Valid Agreement Number, then press Tab​

Can I eliminate the "Exception has been thrown by the target of an invocation." part in the middle of this message? It means nothing to the user.

Thanks for your attention.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top