Schedule - The date and times you entered were invalid

tomelk31
Kilo Explorer

I have built a wizard which is used to add a record to the Schedule Entry table (cmn_schedule_span). The wizard works and the record is inserted correctly but a get an error message "The date and times you entered were invalid". I trying to workout what is causing this as everything looks fine to me and the record is inserted. See screenshots below:

 

Wizard Form

Screen Shot 2014-11-25 at 14.28.47.png

Error Message appears

Screen Shot 2014-11-25 at 14.15.52.png

Schedule Entry

Screen Shot 2014-11-25 at 14.20.04.png

Code used to populate Date/Time field

Screen Shot 2014-11-25 at 14.19.42.png

5 REPLIES 5

Michael Fry1
Kilo Patron

So this creates the Schedule Entry, which I don't think accepts the timezone. The time zone comes from the Schedule. How do we set the schedule? and is there a timezone set there?


The timezone on the schedule is set to floating which I believe picks up the System timezone which in this case is UTC. I set the schedule of the schedule entry to the sys_id of the schedule to build the relationship. Here is a screenshot of the schedule:



Screen Shot 2014-11-25 at 15.21.40.png


I have found the business rule (Schedule Item validate) which is calling a Script Include (ScheduleEntryValidation) which has the following if statement which is causing the error message:



      if (this.cmn_schedule_span.start_date_time.nil() || this.cmn_schedule_span.end_date_time.nil()) {


              gs.addErrorMessage(gs.getMessage("The dates and times you entered were not valid"));


              this._valid = false;


        }



It is against the Schedule Entry table.


Anybody else got any ideas? I have tried passing the date/time using GlideDateTime but that didn't work either.