To resolve this issue if it occurs because you have not explicitly provided a fixed value attribute
type, edit the script for each date parameter. For example:
The original type attribute value in script is:
request.setInParameter("model.instance.header.DateEntered", System.formatDate(model_D_instance_D_header_D_DateEntered, "yyyy-MM-dd' T' HH:mm:ssZ"));
request.addInParameterAttribute("model.instance.header.DateEntered", "mandatory", model_D_instance_D_header_D_DateEntered_OP_mandatory_CP_);
request.addInParameterAttribute("model.instance.header.DateEntered", "readonly", model_D_instance_D_header_D_DateEntered_OP_readonly_CP_);
request.addInParameterAttribute("model.instance.header.DateEntered", "type", model_D_instance_D_header_D_DateEntered_OP_type_CP_);
In this script, the type attribute is modifed by adding an if statement to ensure the date parameter is only used if it is not null:
if (model_D_instance_D_header_D_DateEntered != null) {
request.setInParameter("model.instance.header.DateEntered", System.formatDate(model_D_instance_D_header_D_DateEntered, "yyyy-MM-dd' T' HH:mm:ssZ"));
request.addInParameterAttribute("model.instance.header.DateEntered", "mandatory", model_D_instance_D_header_D_DateEntered_OP_mandatory_CP_);
request.addInParameterAttribute("model.instance.header.DateEntered", "readonly", model_D_instance_D_header_D_DateEntered_OP_readonly_CP_);
request.addInParameterAttribute("model.instance.header.DateEntered", "type", "DateTime");
}
To resolve this issue when you use the specific script parameters in the example above, you must add a JavaScript function at the top of the script. For example:
function convertToIso8601 (dateRfc822) {
return dateRfc822.substr(0, dateRfc822.length-2 ) + ":" + dateRfc822.substr(dateRfc822.length-2);
}
Search for the entry:
System.formatDate(XXXX_DATE_PARAM, "yyyy-MM-dd'T'HH:mm:ssZ");
Replace it with:
convertToIso8601 (System.formatDate(XXXX_DATE_PARAM, "yyyy-MM-dd'T'HH:mm:ssZ"));