About

Edit photo

Thursday, November 9, 2017

Retrieving lightning component tips


How to get Lightning Button label? <lightning:button label="Get Label" onclick="{!c.getLabel}" aura:id="button1" /> <aura:attribute name="buttonLabel" aura:id="btn1" type="String"/> var BtnLabelWay1 = event.getSource().get("v.label"); -- Used when any Action event occurs, ex: onClick var BtnLabelWay2 = component.find("button1").get("v.label"); -- Can use when auraID exist...

Wednesday, November 8, 2017

How to get Salesforce Lightning event label to controller?


The below code is a sample component, is having one attribute for message, and has 2 lightning buttons. Wants to display the button label on Lighting component. <aura:component> <aura:attribute name="message" type="String"/> <p>Message of the...

Sunday, August 27, 2017

Lightning example, Get FullName


Component: <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > <aura:attribute name="fname"...

Sunday, June 4, 2017

Sunday, March 19, 2017

Saturday, March 18, 2017

Scheduling Jobs Simple examples


Example1: Create a task for the opportunity owners who's opportunity is not closed even close date cross the close date. Note: Schedule and Batch classes always should be Global. global class RemindOpptyOwners implements Schedulable { global void execute(SchedulableContext ctx) { List<Opportunity> opptys = [SELECT Id, Name, OwnerId, CloseDate FROM Opportunity ...

Thursday, February 16, 2017

APEX Test Classes - Examples


Apply @istest annotation to code. Signature Characterisitics: static --- test method must be a static void  --- it should always no return type. no parameters --- Don't use parameters. Example: @istest public class myclass { @istest private static void mytest() {...} //or private static void testmethod mytest() {...} } Test cannot do: commit changes to DB. Perform...

Thursday, February 9, 2017

Approval process using apex


An approval process is an automated process which can be used to approve/reject record updates. A record can be submitted for approval request from related list "Approval History". Once a records is submitted it goes for approval to a specified approver. This is a...