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
List<Account> accList = new List<Account>( | |
[Select | |
Id | |
,Name | |
,(Select | |
From | |
Contacts | |
) | |
From Account] |
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
List<Account> accList = new List<Account>([Select Id,Name From Account]); | |
for(Account acc : accList){ | |
Integer numWithEmail = 0; | |
for(Contact cont : [Select Id,Email From Contact Where AccountId = :acc.Id]){ | |
if(!String.isEmpty(cont.Email)){ | |
numWithEmail++; | |
} | |
} | |
} |
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
List<Account> accList = new List<Account>( | |
[Select | |
Id | |
,Name | |
,(Select | |
From | |
Contacts | |
) | |
From Account] |
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
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Apex Replay Debugger", | |
"type": "apex-replay", | |
"request": "launch", | |
"logFile": "${command:AskForLogFileName}", |
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 boolean isTrue(boolean myBool){ | |
if(myBool){ | |
return true; | |
}else{ | |
return false; | |
} | |
} | |
public Map<Id,Contact> getContactMap(){ | |
Map<Id,Contact> contactMap = new Map<Id,Contact>(); |
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 boolean isTrue(boolean myBool){ | |
return myBool; | |
} | |
public Map<Id,Contact> getContactMap(){ | |
return new Map<Id,Contact>([Select Id From Contact]); | |
} |
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
List<Account> parentAccounts = new List<Account>(); | |
for(Contact contactWithAccountInfo : [Select Name,Account.Name,Account.AnnualRevenue From Contact]){ | |
System.debug('Contact Account Id: ' + contactWithAccountInfo.Account.Id); | |
parentAccounts.add(contactWithAccountInfo.Account); | |
} |
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
protected override void afterInsert() { | |
boolean isSuccessfulRun = false; | |
for(Integer i=0; i < Trigger.new.size() && isSuccessful == false; i++){ | |
isSuccessfulRun |= (((DL__c)Trigger.new.get(i)).Status__c == 'Completed'); | |
} | |
if(isSuccessfulRun){ | |
//Kick off batch jobs | |
Database.executeBatch(new MyNotSoFirstBatchJob(),50); | |
} |
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
{ | |
"type": "browser-preview", | |
"request": "attach", | |
"name": "Browser Preview: Attach" | |
}, | |
{ | |
"type": "browser-preview", | |
"request": "launch", | |
"name": "Browser Preview: Launch", | |
"url": "http://localhost:3333" |
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
import { LightningElement } from 'lwc'; | |
import moment from '@salesforce/resourceUrl/moment'; | |
import { loadScript } from 'lightning/platformResourceLoader'; | |
export default class MomentStuffs extends LightningElement { | |
renderedCallback(){ | |
Promise.all([ | |
loadScript(this, moment + '/moment.js') | |
]).then(() => { |
NewerOlder