function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jojoforcejojoforce 

Navigate to Calendar tab or Event in Salesforce Mobile

How do yo navigate to the Calendar tab or to the Event list in Salesforce Mobile? Do we use the force:navigateToComponent? or lightning:navigation?  Any example is greatly appreciated.
Best Answer chosen by jojoforce
jojoforcejojoforce
The following code snippet worked.
 
var urlEvent = $A.get("e.force:navigateToURL");

            urlEvent.setParams({
              "url": "/lightning/o/Event/home"
            });
            urlEvent.fire();

 

All Answers

VinayVinay (Salesforce Developers) 
Hi,

Unfortunately,  it is not possible to add Calendar in Salesforce 1 but we can add Events and Task in the Salesforce 1.

Setup -> Mobile Administration -> Salesforce Navigation

Kindly review below idea link and vote

https://trailblazer.salesforce.com/ideaView?id=08730000000ky8jAAA

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
VinayVinay (Salesforce Developers) 
Yes, calendar is unavailable in mobile.

Idea link: https://trailblazer.salesforce.com/ideaView?id=08730000000ky8jAAA

Thanks,
jojoforcejojoforce

there is no full calender support in mobile, but there is a partial "Events" view. I'm trying to figure out how to redirect to the Calendar Tab (and events tab in mobile). 



User-added image

jojoforcejojoforce
The following code snippet worked.
 
var urlEvent = $A.get("e.force:navigateToURL");

            urlEvent.setParams({
              "url": "/lightning/o/Event/home"
            });
            urlEvent.fire();

 
This was selected as the best answer
David Roberts 4David Roberts 4
There are two ways to achieve this.
The e.force method has been superceded by navigation service.

Here's the old way:
var homeEvt = $A.get("e.force:navigateToObjectHome");
homeEvt.setParams({
            "scope": "Event"
        });
homeEvt.fire();

And here's the new way:
//in your component
<lightning:navigation aura:id="navService"/>
 
//as a helper:
    hlpNavigateToHome : function(component) {
        
        var pageReference = {
                type: "standard__objectPage",
                attributes: {
                    objectApiName: "Event",
        			actionName: 'home'
                }
        };//pageReference
        var navService = component.find("navService");
        navService.navigate(pageReference);
        
    },//hlpNavigateToHome