Contact Us:

670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

Salesforce Cookies #17

Recalculating Formula on a record without even querying the fields When you’re working in Triggers or in apex code, you may want to get a recalculated formula field values on a particular object. This can be done with the help of a method in the Formula class. Let’s have a look on syntax and an […]

Salesforce Cookies #16

Overriding the LWC standard component’s style As we all know that LWC uses shadow DOM which makes an isolation between our custom components and LWC standard components. When you add a style to your component’s css file it doesn’t apply to the standard components and that’s a limitation. Example: Let’s say you have a lightning-textarea […]

Salesforce Cookies #15

How to use Salesforce REST API in Lightning Component If you are working with REST/SOAP APIs in the apex class which is being used in the lightning component, then using UserInfo.getSessionId() will give the session id which can not be used to make the API calls due to security restrictions. There is a workaround for […]

Salesforce Cookies #14

How to use Lightning component into a Visualforce page Sometimes, you might have a situation where you want to access your lightning component in the Salesforce classic view and here ltng:outApp comes into picture. ltng:outApp : Is a component in the long namespace which is used to expose your lightning component outside of the lightning […]

Salesforce Cookies #13

How to validate fields in lightning components ( Form Validation in Lightning Component ) Some lightning components come with inbuilt validation and you need to trigger the validation in your client-side controller. Following components provide inbuilt validation support. lightning:input lightning:select lightning:textarea ui:input* lightning:input is more powerful when it comes to the validation as it honors […]

Salesforce Cookies #12

How to remove the arrows from lightning:input[type=”number”]? I think this is a generic question and Salesforce devs have looked for the ways to get rid of the spin buttons on the input field without changing it to text type for a purely numeric behaviour. You just need a few lines of CSS to solve your problem. […]

Salesforce Cookies #11 ( Salesforce Admin Special )

Is there a way to mass-check Checkboxes when updating a Profile’s Object’s Field-Level Security? Of course, there is. You can do it through your browser’s console. You just need the following Javascript code snippet which will do the job for you. For the Edit Permission var checkboxes = document.querySelectorAll(“.displayedCol input”); for (var i = 0; […]

Salesforce Cookies #10

Creating a dynamic SOQL which includes all the fields I have seen this question several times on developer forums and I thought it could be another addition to Salesforce cookies. If you are wondering how can you query all the fields of an object then you can use the following code snippet. https://gist.github.com/sfcure/81888ea3d0038b8f14df7c2006d98d7a The above […]

Salesforce Cookies #9

Populating merge fields in Salesforce Email Template without sending the email / Preview Email Template Recently, I faced a challenge while working on a small project in which I had to send email through apex using email templates. I am calling it a challenge because of the problem I faced and I am sharing the […]

Salesforce Cookies #8

How to use namespace in managed lightning components If you are working on a lightning component and it’s going to be a part of a managed package then you need to take care of namespace in client side JS code if you are accessing any custom field. This can be handled in various ways but […]

  • 1
  • 2