Topic by Christopher Farmer
Content
Hi all,
I'm working with Connect for PHP and Custom Objects.
The Custom Object has 3 fields, namely reference, evidence and section_label. The section_label is the only required field, though the user cannot change this, it is automatically set when the Custom Object is created.
When I attempt to store a null value in either the reference or evidence fields, I receive the following error message:
Fatal error: Uncaught exception 'RightNow\Connect\v1\ConnectAPIError' with message 'Min length not met: value 0 < 1 minimum length: Section(ID=180).evidence' in /cgi-bin/******.cfg/scripts/euf/application/development/source/controllers/ajaxCustom.php:49
This seems to suggest that there is a minimum length of 1 character for the evidence field, though I have selected 'Is Nullable' in the object designer. If I store a single character in the field, the error message does not appear. Further, when I update the evidence field through the RightNow console, an error is not displayed and the changes are saved without any trouble, which perhaps suggests that the problem is not what I imagine it to be.
If it is applicable, my Connect for PHP code resides in a custom controller, which is called using an AJAX request as a submit button is clicked.
Please see the image and file attached to this thread for screenshots of my Object Designer.
Would anyone care to suggest why I'm receiving this error?
Many thanks,
Chris.