A calendar component runs its popup's rendering rules before its initializing javascript snippet

  • 1
  • Problem
  • Updated 3 months ago
  • In Progress
In my Calendar component, the Event On-Click Behavior is set to Run Snippet Then Show Custom Popup. The snippet does several things, one of which is to "lock" the selected record so that no other user can process the same one. 

The custom Popup has, essentially, two Page Titles for the "is locked" and "not locked" scenarios. Rendering rules are looking for the "locked by"  value in the selected calendar record.

The problem is that the Rendering Rules apparently process before the snippet completes, although field values displayed in the Page Title do reflect the completion of the snippet.

As I read an earlier discussion (https://community.skuid.com/skuid/topics/calendar-popup-showing-before-deferred-promise-resolved?top...), this behavior should have changed way back in Superbank patch 5.

Is there something I might be missing in this implementation?

[Some notes on the use case: This will be run in a public-facing Site, so it is always the same run-time User. Each use will login with a "Member Id," which is the Name field of the Member__c object. The calendar will display multiple events to all members, but only one member at a time should be allowed to interact with a given event. In other words, it is event registration with limited capacity per event, and a registrant may specify multiple units. Think online ordering of movie tickets. I am attempting to lock the event record by populating the LockedBy__c field with Member__c.]
Photo of Mike Dwyer

Mike Dwyer

  • 3,330 Points 3k badge 2x thumb

Posted 3 months ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
What version are you on now?
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Can you post a simple reproduction page using standard objects? If so, we can take a deeper look at it internally?
Photo of Mike Dwyer

Mike Dwyer

  • 3,330 Points 3k badge 2x thumb
11.1.14, and not simple to reproduce, even with standard objects.