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
Angelo RendonAngelo Rendon 

How to create button which opens the New Contact modal in Lightning?

I am trying to create a button in a lightning component which opens the New Contact model. I am unsure of how to do this. so far i only have the button:

<ui:button label="+ Add Contact" press="{}"/>

Im guessing the press will call a function which routes to the New Contact page, but what would be the URL to do so?
Thanks
Angelo RendonAngelo Rendon
Nvm, got it!

Solution: 


navigateToURL: function(component, event) {
        var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({"url": "/003/e?"});
           urlEvent.fire();
    }