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
({ | |
update: function(component, evt, helper) { | |
var expense = component.get("v.expense"); | |
var updateEvent = $A.get("e.c:updateExpenseItem"); | |
updateEvent.setParams({ "expense": expense }).fire(); | |
}, | |
gotoRecord: function(component, evt, helper) { | |
console.log("onclick"); |
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
<apex:page showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0"> | |
<script type="text/javascript"> | |
//redirect to desktop-only version of page | |
if( (typeof sforce == 'undefined') || (sforce == null) ) { | |
if ({!isnull($CurrentPage.parameters.iframeurl)}){ | |
window.location.assign("{!$Page.responsiveIframeDesktop}"); | |
} else { | |
window.location.assign("{!$Page.responsiveIframeDesktop}?iframeurl={!$CurrentPage.parameters.iframeurl}"); | |
} |
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
public with sharing class DepreciationCalc { | |
public static void deleteCurrentDepreciation(list<Asset__c> assets){ | |
delete [select id from Depreciation__c where Asset__c in:assets]; | |
} | |
public static void makeDepreciations(list<Asset__c> assets){ | |
list<Depreciation__c> output = new list<Depreciation__c>(); | |
//loop through the assets |
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
<apex:page showHeader="false" sidebar="false" standardController="Inspection_Step__c"> | |
<!-- Remote Objects definition to set accessible sObjects and fields --> | |
<apex:remoteObjects > | |
<apex:remoteObjectModel name="Inspection_Step__c" jsShorthand="step" | |
fields="Name,Id,Inspection__c,Step_Number__c,Rating__c"> | |
</apex:remoteObjectModel> | |
</apex:remoteObjects> | |
<script type="text/javascript"> |
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
//first, import jquery | |
var script=document.createElement('script'); | |
script.type='text/javascript'; | |
script.src='https://code.jquery.com/jquery-latest.min.js'; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<types> | |
<members>*</members> | |
<name>ApexClass</name> | |
</types> | |
<types> | |
<members>*</members> | |
<name>ApexComponent</name> | |
</types> |
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
//Salesforce1 deeplink url -- the QR code links to salesforce1://sObject/[Id]/view | |
IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=salesforce1://sObject/"+Id+"/view", "QR") |
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
.slds-size--1-of-13{width: 7.69230769230769%;} | |
.slds-size--2-of-13{width: 15.3846153846154%;} | |
.slds-size--3-of-13{width: 23.0769230769231%;} | |
.slds-size--4-of-13{width: 30.7692307692308%;} | |
.slds-size--5-of-13{width: 38.4615384615385%;} | |
.slds-size--6-of-13{width: 46.1538461538462%;} | |
.slds-size--7-of-13{width: 53.8461538461538%;} | |
.slds-size--8-of-13{width: 61.5384615384615%;} | |
.slds-size--9-of-13{width: 69.2307692307692%;} | |
.slds-size--10-of-13{width: 76.9230769230769%;} |
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
action.setCallback(this, function(a){ | |
if (a.getState() === "SUCCESS") { | |
//happy path stuff | |
} else if (a.getState() === "ERROR"){ | |
var appEvent = $A.get("e.c:handleCallbackError"); | |
appEvent.setParams({ | |
"errors" : a.getError(), | |
"errorComponentName" : "someUniqueName" | |
}); | |
appEvent.fire(); |
OlderNewer