Salesforce Cookies #6

Adding Loading Icon on the page for an AJAX Request ( ActionFunction, CommandButton) It's always good to add a loading icon on the page when you are proccessing something on server side (calling a apex method ), so a user can understand that something is running in the background. Following code snippet can be used … Continue reading Salesforce Cookies #6

Salesforce Cookies#5

Uploading Attachment from Non-Salesforce Users ( Site or Guest Users) through Force.com sites I came across a question on Trailblazers community where someone asked for a way to upload an attachment to a record and it should be accessible by non-salesforce users. I won't go into much detail about that and will focus on providing … Continue reading Salesforce Cookies#5

Salesforce Cookies #4

Never store record's Id as a String (Variable type) if you are comparing Ids in your Apex code If you are writing apex code then make sure that you are treating Ids' carefully.  You should emphasize on declaring your variables of Id-type instead of String since storing record Id in a variable which type is … Continue reading Salesforce Cookies #4

Salesforce Cookies #2

Now using Lightning Design System in Lightning Application is easier - No static resource is required to include CSS files. An application automatically gets Lightning Design System styles and design tokens if it extends force:slds. Same behaviour can be accomplished in Visualforce pages with the help of apex:slds component. Include <apex:slds /> in a Visualforce page to use Lightning … Continue reading Salesforce Cookies #2

Salesforce Cookies #1

Accessing record ID in the Lightning component is very simple. Just use following things. Implements force:hasRecordId interface in the component as follows. <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global"> Define an aura:attribute as follows. <aura:attribute name="recordId" type="String" description="The ID of the record to be displayed. Provided by force:hasRecordId interface."/>