I have developed a lightning component as below.
I have a Lightning Component Navigate.cmp. In that a Button is there. When i click that button it should open a record of case there itself means in Salesforce1 app itself.(in my example i mentioned one satic ID)
But it's not opening the record. Can any one guide me how to open a record when button clicks.
Here is my Component and .js code
Component
<aura:component >
<ui:button press="{!c.navigate}" label="NavigateURL" ></ui:button>
</aura:component>
.js
({
navigate : function(component, event, helper) {
var urlEvent = $A.get("e.force:navigateToURL");
var myUrl = '#/sObject/' + '50028000002MXyV'+ '/view';
urlEvent.setParams({
"url": myUrl
});
urlEvent.fire();
}
})
please guide me. I have stuck here. Thanks in advance.