Forum Post: RE: Change defaults on calendar object

  • Thread starter Thread starter Godfrey Sorita
  • Start date Start date
Status
Not open for further replies.
G

Godfrey Sorita

Guest
Adding a code to the onload section of the calendar page does not actually solve the problem because the calendar component takes a few seconds to load completely. A part of the code could run prior to the loading of the calendar component. Even so, I was able to find a workaround using undocumented functions from the JS libraries used by Rollbase. Please paste the code below your calendar: script type="text/javascript" function setCalendarFilters() { /* Description: Use to set 'Show' filter Possible values for objectFilter variable: 1. -1 = All Tasks & Events 2. -10 = All Tasks 3. -20 = All Events 4. Object Definition ID = Specific Object(e.g 110006390) */ var objectFilter = '110006358'; $("#rbe_objectsFilter").val(objectFilter); /* Description: Use to set 'Assigned To' filer Possible values for assignedToFilter variable: 1. Me = Only Me 2. ALL_USERS = Any Users 3. R Role ID = Specific role(e.g R90) 4. G Group ID = Specific group(e.g G110007529) */ var assignedToFilter = 'R90'; $("#rbe_assignedToFilter").val(assignedToFilter); rbf_refreshData(); } rbf_addOnLoadMethod(setCalendarFilters); /script Note: You will have to manually change the value objectFilter and assignedToFilter variables depending on the filter you need. Please remember that undocumented functions can change between major version releases. Its usage is not recommended but so far this is the only workaround solution I can provide.

Continue reading...
 
Status
Not open for further replies.
Back
Top