To check the field limit

HI Team,I have a requirement as below.

There are 2 fields in a form. Let’s say “FieldA” and “FieldB”. Both are text fields. After filing up the values of field, when i click a button to go to next page, it should call an agent and it should validate whether these 2 fields “FieldA” and “FieldB” values length should be less than (say) 10.

Can someone please help me to write code for this only using lotus script?

Subject: To check the field limit

Use Len() to get the length of a string.You use the FieldGetText method of the NotesUIDocument class to get the content of the field.

An easy way to get the NotesUIDocument in a button is to use the CurrentDocument property of the NotesUIWorkspace.