This file contains hidden or 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 OpportunityTrigger on Opportunity (before update) { | |
Set<Id> ownerChangeOppIds = new Set<Id>(); | |
for (Opportunity opp : Trigger.new) { | |
if(opp.ownerId != Trigger.oldMap.get(opp.Id).OwnerId) { | |
ownerChangeOppIds.add(opp.Id); | |
} | |
} | |
if(!ownerChangeOppIds.isEmpty()) { | |
String oppShares = JSON.serialize([select opportunityId, UserOrGroupId, OpportunityAccessLevel, RowCause | |
from OpportunityShare |
This file contains hidden or 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
var action = component.get("c.getItems"); | |
action.setStorable(); | |
action.setCallback(this, function(response) { | |
// handle response | |
}; | |
$A.enqueueAction(action); |
This file contains hidden or 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 > | |
<aura:method name="add" action="{!c.add}" access="public"> | |
<aura:attribute name="numbers" type="Double[]"/> | |
</aura:method> | |
<aura:method name="square" action="{!c.square}" access="public"> | |
<aura:attribute name="number" type="Double"/> | |
</aura:method> | |
</aura:component> | |
// Controller // |
This file contains hidden or 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:event type="COMPONENT"> | |
<aura:attribute name="message" type="String"/> | |
</aura:event> |
This file contains hidden or 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 extends="c:DataSvc" controller="AccountsListController"> | |
<aura:attribute name="rows" type="Object[]" description="The row data."/> | |
<aura:attribute name="columns" type="List" default="[{label:'Id', fieldName: 'Id', type: 'text'},{label:'Name', fieldName: 'Name', type: 'text'}]"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<lightning:datatable data="{!v.rows}" keyField="Id" columns="{!v.columns}"/> | |
</aura:component> | |
//CONTROLLER |
This file contains hidden or 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 > | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<aura:attribute name="newLogRec" type="Error_Log__c" /> | |
<aura:attribute name="newLog" type="Error_Log__c" /> | |
<aura:attribute name="logError" type="string" description="Error message returned by logging service" /> | |
<force:recordData aura:id="errorLogCreator" | |
layoutType="FULL" | |
targetRecord="{!v.newLogRec}" |
This file contains hidden or 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="EmailSendController" implements="force:lightningQuickAction,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global"> | |
<!--Part 1 [for attribute declare]--> | |
<aura:attribute name="email" type="string"/> | |
<aura:attribute name="subject" type="string"/> | |
<aura:attribute name="body" type="string"/> | |
<aura:attribute name="mailStatus" type="boolean" default="false"/> | |
<!---Part 2 [header part] --> | |
<div class="slds-page-header" role="banner"> | |
<h1 class="slds-page-header__title slds-m-right--small slds-align-middle slds-truncate" title="this should match"> |
This file contains hidden or 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 implements="flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes" extensible="true"> | |
<aura:method name="execApex" action="{! c.execApex }"> | |
<aura:attribute name="callingComponent" type="Aura.Component" default="{! this }" /> | |
<aura:attribute name="method" type="String" /> | |
<aura:attribute name="params" type="Map" /> | |
</aura:method> | |
{! v.body } |
This file contains hidden or 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
#!/bin/bash | |
# SFDX menu for my most commonly called commands | |
# | |
function run { | |
echo | |
echo $1 | |
eval "$1" | |
echo | |
} |
This file contains hidden or 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
#!/bin/sh | |
# Create a live agent session, polling every second for messages | |
# | |
domain="https://[DOMAIN-HERE]salesforceliveagent.com" | |
orgid="ORG-ID-HERE" | |
deploymentid="DEPLOYMENT-ID-HERE" | |
buttonid="BUTTON-ID-HERE" | |
createchat () | |
{ |