Lighting Component to Open any Url of site in new tab by using Custom Label

In this post, explaining a sample lightning component with a button to open any url through custom label. Step:1 Create a custom label with name 'url label and give url like 'https://wordpress.com/post/jayakrishnasfdc.wordpress.com/' Step:2 Create below lightning  component Lightning Component: <aura:component implements="flexipage:availableForAllPageTypes,force:appHostable,flexipage:availableForRecordHome,force:hasRecordId" access="global" > </aura:component> .js Controller ({ handleClick : function(component, event, helper) { window.open($A.get("$Label.c.urllabel")); } …

Continue reading Lighting Component to Open any Url of site in new tab by using Custom Label

Advertisements

Export List views with Shared To details

In this post we can see how to export list views with shared to details in salesforce. Its not possible to retrieve who can access a list view with simple SOQL query, but we can retrieve who can access a list view using sharedTo field. We can use a SOQL query for this, as this is metadata …

Continue reading Export List views with Shared To details

Get Current User Id Information in Lightning Web Components

Here in this post i am sharing how to get current user id information in different ways in salesforce... VF Page: Use {!$User.Id} Lightning Component: We have to call apex method to return system.UserInfo.getUserId() now we no longer have to do this method. In the Lightning Controller, call the $A.get(“$SObjectType.CurrentUser.Id”) to get the information like below.. var …

Continue reading Get Current User Id Information in Lightning Web Components

SVG Usage in salesforce Lightning Components

SVG stands for Scalable Vector Graphics. It is a custom icon resource for components used in Lightning App Builder or Community Builder. In Lightning Components, The default SVG looks like and if we want to customize this icon to some other icon, we need to create a SVG for our lightning component.   Create a sample …

Continue reading SVG Usage in salesforce Lightning Components

Top 3 Strategies for Rolling Out Lightning Experience

In general, one of the challenges we consistently hear is that admins and IT teams are having trouble finding a reason to prioritize the Lightning Experience transition. The reality is that if you are still building customizations in Salesforce Classic, then you are generating technical debt that you are eventually going to need to clean …

Continue reading Top 3 Strategies for Rolling Out Lightning Experience

force:showToast In lightning Controller

A toast displays a message below the header at the top of a view. The message is specified by the messageattribute. force:showToast is not available on login pages. Toasts are the simplest form of notification a developer can use to display a notification dynamically. Toasts are 4 types  info success warning error Basic Format is showMyToast : function(component, …

Continue reading force:showToast In lightning Controller

Most Repeated Test Class Failures during Deployments

Today I am posting about What are the most repeated test class issues we face while deploying components from source to destination org and its solutions... 1.System.LimitException: Too many SOQL queries: 101  Avoid SOQL queries that are inside FOR loops. Make sure you don't have a recursive loop calling a SOQL. Do not do any …

Continue reading Most Repeated Test Class Failures during Deployments