Skip to main content

Posts

Showing posts from May, 2019

Salesforce lightning component e.force:navigateToURL

This article will explain how to use ‘e.force:navigateToURL’ lightning component to navigate the system to any URL (visualforce page, record, any custom URL). Syntax of ‘e.force:navigateToURL’ var urlEvent = $A.get("e.force:navigateToURL");         urlEvent.setParams({           "url": "/" + recordId ,             "isredirect": "true"         });         urlEvent.fire(); Description of the parameters, 1.        URl – Set this parameter to the required URL that you want to redirect, in this example ‘recordId’ is my variable with has the Id of the record I want to redirect. We can use static URL (e.g https://www.salesforce.com ) as well. 2.        Isredirect – This is optional, this flag will not...

Visual Studio Code Setup for Salesforce

This Article explains the initial setup of the VS Code, to start coding in your sandbox or prod org. You will be able to create a component and save back to the org from this article. Step 1) Install  VsCode . Click  here to download .(Please use 1.24 version) Step 2) Install  SFDC CLI     https://developer.salesforce.com/tools/sfdxcli Step 3) Install the  Salesforce Extension for VS Code . and " ForceCode " Extensions. Step 3) Restart the VS Code.                 NOTE : To run all the commands use ctl+shft+P Step 4) Run below command to create new project with manifest 1.        sfdx: create project with manifest 2.        Enter Project name and select folder path. 3.        NOTE: Don’t use space in Name, you may need to run this comman...