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="PicklistController"> | |
<aura:attribute name="sObjectName" type="String" /> | |
<aura:attribute name="fieldName" type="String" /> | |
<aura:attribute name="picklistValues" type="Object" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
</aura:component> |
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 static void publishNotifications(List<String> messages){ | |
List<Notification__e> notifications = new List<Notification__e>(); | |
for (String message: messages) { | |
notifications.add(new Notification__e(Message__c = message)); | |
} | |
List<Database.SaveResult> results = EventBus.publish(notifications); | |
//process results | |
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
pchittum-ltm:dreamhouse-wt pchittum$ sfdx force:apex:test:run -u dreamhouse -d deploy -r human -c | |
Listening for results | |
Invoking Apex tests using dreamhouse... | |
Started async test run job: 7075800002GiN0g | |
Test run id written to deploy/test-run-id.txt | |
Processing event for job 7075800002GiN0gAAF | |
Processing event for job 7075800002GiN0gAAF | |
Processing event for job 7075800002GiN0gAAF | |
Processing event for job 7075800002GiN0gAAF | |
Processing event for job 7075800002GiN0gAAF |
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
//alternative or additional query to show sub query that is not unbounded | |
for(Account a : [SELECT Id,Name | |
FROM Account | |
WHERE Id IN :Trigger.New | |
AND Id NOT IN (SELECT AccountId | |
FROM Opportunity | |
WHERE AccountId in : Trigger.New)]){ | |
System.debug(a); | |
} |
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
for n <- 1..20 do | |
cond do | |
rem(n, 15) == 0 -> "fizzbuzz" | |
rem(n, 5) == 0 -> "buzz" | |
rem(n, 3) == 0 -> "fizz" | |
true -> n | |
end | |
end |
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 AccountViewEditService { | |
@AuraEnabled | |
public static Account fetchAccount(Id acctId){ | |
Account newAcct; | |
try { | |
System.debug('querying for account id: ' + acctId); | |
newAcct = [SELECT Id, Name, Type, ParentId, BillingStreet, BillingCity, BillingState, | |
BillingPostalCode, BillingCountry, BillingLatitude, BillingLongitude, | |
BillingGeocodeAccuracy, Phone, Fax, AccountNumber, Website, PhotoUrl, |
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 HandleProductPriceChange on Merchandise__c (after update) { | |
List<Line_Item__c> openLineItems = | |
[SELECT j.Unit_Price__c, j.Merchandise__r.Price__c | |
FROM Line_Item__c j | |
WHERE j.Invoice__r.Status__c = 'Negotiating' | |
AND j.Merchandise__r.id IN :Trigger.new | |
FOR UPDATE]; | |
for (Line_Item__c li: openLineItems) { |
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 ViewStateStudy_controller { | |
public String accId{get;set;} | |
public Account account{get;set;} | |
public ViewStateStudy_controller() | |
{ | |
accId = ApexPages.currentPage().getParameters().get('Id'); | |
if(accId != null) | |
{ |
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
In what country do you currently reside? | |
United States | |
What city or town do you live in? | |
Houston | |
How old are you? | |
<20 | |
What is your gender? | |
Male | |
Tabs or Spaces? | |
Spaces |
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
In what country do you currently reside? | |
United States | |
What city or town do you live in? | |
Houston | |
How old are you? | |
<20 | |
What is your gender? | |
Male | |
Tabs or Spaces? | |
Spaces |