0

I have an <apex:commandLink> that opens calendar page in a new tab :

<apex:commandLink value="Calendar" target="_blank" action="{!showCalendar}"/>

In controller, I have :

public PageReference showCalendar() {
    PageReference page = new PageReference('/00U/c');
    page.setRedirect(true);
    return page;    
}

This code redirects from calendar page.

I would like to know, what are the parameters I can put in URL to :

  • select if I show one or several users in calendar,
  • select 1-day, 1-week or 1-month for the view,
  • select the start day of the period to show.

Where can I find this parameters ?

2 Answers 2

1
PageReference page = new PageReference('/00U/c?md0=2015&md1=11');

Here md0 is year and md1 is month.

md2 is week and

PageReference page = new PageReference('/00U/c?md0=2015&md2=40');

md3 is day and

PageReference page = new PageReference('/00U/c?md0=2015&md3=330');

Note: only month starts with 0.

For Multi-User Calendar - Day View

PageReference page = new PageReference('/00U/c?cType=2&md0=2015&md3=330');

For Multi-User Calendar - Month View

PageReference page = new PageReference('/00U/c?cType=2&md0=2015&md1=10');

For Multi-User Calendar - Week View

PageReference page = new PageReference('/00U/c?cType=2&md0=2015&md2=44');

You need to add cType=2

0
1

For month view:

PageReference page = new PageReference('00U/c?cType=1&md0=2015&md1=11');

md1 is month view

For week view:

PageReference page = new PageReference('00U/c?cType=1&md2=50&md0=2015');

md2 is week number

For day view:

PageReference page = new PageReference('00U/c?cType=1&md0=2015&md3=341');

md3 is day number

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .