This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AuraEnabled(cacheable=true) | |
public static AccountWrapper getAccount(Integer pageNumber ,Integer | |
recordToDisplay) { | |
// create an instance of wrapper class. | |
AccountWrapper AccountWrapperObject = new AccountWrapper(); | |
// set the pageSize,Page(Number), total records and accounts List(using OFFSET) | |
AccountWrapperObject.recordToDisplay = recordToDisplay; | |
AccountWrapperObject.pageNumber = pageNumber; | |
AggregateResult[] groupedResults = [SELECT count(Id)cnt FROM Account]; | |
AccountWrapperObject.totalAccount = Integer.valueof(groupedResults[0].get('cnt')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class googleAddressAutofill { | |
/** | |
* @description : Auto suggestion Web Service | |
* @param : input: SearchAddress , types: Results Types , langug : language for getting the results | |
* @return : string | |
**/ | |
@AuraEnabled | |
public static string getSuggestions(String input) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="googleAddressAutofill" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader" access="global"> | |
<aura:attribute name="location" type="string" default="" /> | |
<aura:attribute name="predictions" type="List" default="[]" /> | |
<aura:attribute name="city" type="string" default="" /> | |
<aura:attribute name="country" type="string" default="" /> | |
<aura:attribute name="state" type="string" default="" /> | |
<aura:attribute name="street" type="string" default="" /> | |
<aura:attribute name="zip" type="string" default="" /> | |
<aura:attribute name="boolean" type="boolean" default="false" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit: function(component, event, helper) { | |
var action = component.get("c.getOppStage"); | |
action.setParams({ | |
"oppId": component.get("v.recordId"), | |
}); | |
action.setCallback(this, function(response) { | |
var state = response.getState(); | |
console.log('return value'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
callServer: function(component, method, callback, params) { | |
var action = component.get(method); | |
if (params) { | |
action.setParams(params); | |
} | |
action.setCallback(this, function(response) { | |
var state = response.getState(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.THIS .button{ | |
border: 1px solid rgb(221, 219, 218); | |
transition: border .15s linear; | |
border-color: rgb(221, 219, 218); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger StageUpdate on Opportunity (before insert) { //Starting of trigger | |
for(Opportunity o : trigger.new ){ //for-each loop on records in trigger.new | |
if(o.LeadSource == 'Web') //if opportunity field Leadsource is Web | |
o.StageName = 'Closed Won'; //Changing Opportunity stage name to Closed Won | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger CreateCaseAcc on Account (after insert) { | |
List<Case> acclist=new List<Case>(); //New list of case | |
for(Account a:trigger.new){ | |
if(a.Active__c=='Yes'){ //if custom field active on account is Yes | |
Case c=new case() ; //instance for creating new case | |
c.accountid=a.id; //attaching case to account | |
c.status='New'; | |
c.origin='Phone'; | |
acclist.add(c); //adding case to a list to for insert | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trigger: | |
/************************************************************************************** | |
Name : OpportunityTrigger | |
Description : | |
Revision History : - | |
Created/Modified by Created/Modified Date Requested by Related Task/Issue | |
---------------------------------------------------------------------------------------- | |
1. Nevo 26/01/2016 Roee Alon [SW-17499] | |
****************************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************************** | |
Name : AccountTrigger | |
Description : | |
Revision History : - | |
Created/Modified by Created/Modified Date Requested by Related Task/Issue | |
---------------------------------------------------------------------------------------- | |
1. Nevo 26/01/2016 Roee Alon [SW-17499] | |
****************************************************************************************/ | |
trigger AccountTrigger on Account(Before insert, Before update,After insert) |
OlderNewer