February 24 2012 Friday

More XPages error-fun...

I really enjoy debugging mysterious error messages from XPages...

Today, it's "field in note has wrong datatype":

Image:More XPages error-fun...

I have experienced this problem upon a question from my client. Save button (which only submits the form) results in this error. After analyzing the page (analyze=delete all elements except the button) I decided that XPages elements have nothing to do with the problem. It was computing the document before saving, so that must be the problem. Indeed, I analyzed the form (analyze=delete fields part by part). Finally I found it. Here I will show you...

Let's create a simple form:

Image:More XPages error-fun...

You will notice that: Field has a type for date/time but we are putting an integer... Simple mistake for a Notes developer, but it will work on client without any error...

Now add it to a data source and try to save it (put an error messages control to see the problem).

You have thousand fields on your form?

Have fun!!!

Serdar Basegmez   |   February 24 2012 05:36:42 PM   |    XPages    |  
  |   Next   |   Previous

Comments (2)

Gravatar Image
Serdar Basegmez    http://lotusnotus.com/en    03/01/2013 11:02:04 AM

Have you checked other properties of the field? InputTranslation, InputValidation etc.?

Gravatar Image
ann       03/01/2013 10:35:09 AM

I'm getting that error on a TEXT field. As long as the text field is blank, I can save the document. But as soon as I put text in the field, I get that error. Any idea why that would be happening?