Skip to content

Instantly share code, notes, and snippets.

@pranayjswl007
Created March 28, 2019 11:11
Show Gist options
  • Save pranayjswl007/355fe142a7a60bce2e0863d240f37703 to your computer and use it in GitHub Desktop.
Save pranayjswl007/355fe142a7a60bce2e0863d240f37703 to your computer and use it in GitHub Desktop.
({
handleClick : function(component, event, helper) {
let pageReference = {
type: 'standard__navItemPage',
attributes: {
apiName: 'MYVFPAGE'
},
state: {
caseNumber: 'jAR'
}
};
var navService = component.find("navService");
navService.generateUrl(pageReference)
.then($A.getCallback(function(url) {
console.log('Using Navigate'+url);
navService.navigate(pageReference);
//window.open(url);
}), $A.getCallback(function(error) {
console.log(error);
}));
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment