calendar bug (StartDateTime /EndDateTime)

  • 2
  • Problem
  • Updated 2 years ago
  • Not a Problem
Currently, if I update StartDateTime on event. The EndDateTime will automatically get updated to a different time even if I don't want to change it. For example, If set time is 8am to 5pm and I change StartDateTime to 9am EndDateTime will then automatically change to 6pm. I assume the event range is just trying to hold it's duration but is there anyway to fix this? Is this a skuid bug?
Photo of Kyle Mathis

Kyle Mathis

  • 576 Points 500 badge 2x thumb

Posted 2 years ago

  • 2
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Yes you are right about the Event trying to hold its duration --- Salesforce does that behind the scenes, it's a quirky functionality of the Event object. Since you're only changing the StartDateTime field, and not the Duration or EndDateTime fields, Salesforce tries to maintain the Duration by changing the EndDateTime to match. So it's not a Skuid bug, it's Salesforce behavior.

You could workaround this by explicitly forcing changed values for both the StartDateTime and EndDateTime fields to be sent to Salesforce whenever you change one of them. A Model Action where "Row updated" is the Initiating Event, with some Ui-Only Formula Fields, would probably let you workaround this behavior. 
Photo of Kyle Mathis

Kyle Mathis

  • 576 Points 500 badge 2x thumb
Thanks! Will give this a try.