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
<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 > | |
<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 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: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 > | |
<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
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
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
global class Email2Case implements Messaging.InboundEmailHandler { | |
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) { | |
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult(); | |
String body = email.plainTextBody; | |
Case newCase = new Case(); | |
newCase.SuppliedEmail = parse(body,'EMAIL:',false); | |
newCase.SuppliedName = parse(body,'LAST NAME:',false); | |
newCase.Description = 'Accepted Terms: ' + parse(body,'ACCEPTED TERMS',false) + ' Receive Further Info: ' + parse(body,'RECEIVE FURTHER INFO',false) + ' ' + parse(body,'MESSAGE:',true); | |
newCase.Subject = 'Email from ' + parse(body,'EMAIL:',false); | |
insert newC |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="React by Example - Components"> | |
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> | |
<script src="http://fb.me/react-with-addons-0.14.3.js"></script> | |
<script src="http://fb.me/react-dom-0.14.3.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> |