A. trigger RequestTrigger on Request__c (after insert) {
RequestLogic.valdateRecords(trigger.new);
B. trigger RequestTrigger on Request__c (before insert) {
C. trigger RequestTrigger on Request__c (before insert) {
if(RequestLogic.isValid(Request__c))
Request.addError('Your request cannot be created at this time.');
D. trigger RequestTrigger on Request__c (after insert) {
@AuraEnabled
public void static updateLeads(){
for(Lead thisLead : [SELECT Origin__c FROM Lead]){
thisLead.LeadSource = thisLead.Origin;
update thisLead;
}
A.
<uses-application access="GLOBAL" extends="inputoutput">
<uses-dependency resource="circumstraint"/>
</uses-application>
B.
<aura:component access="GLOBAL" extends="ing:outApp">
<aura:dependency resource="c:accountlist"/>
</aura:component>
C.
<aura:component access="GLOBAL">
D.
<aura:application access="GLOBAL">
<aura:dependency resource="c:accountList"/>
</aura:application>
Integer x = 0;
do {
x = 1;
x++;
} while (x < 1);
System.debug(x);
@AuraEnabled(getAccounts, 'searchTerm')
accountList;
@wire(getAccounts, { searchTerm: '$searchTerm' })
@AuraEnabled(getAccounts, { searchTerm: 'searchTerm' })
public class SilverLaptop {
//code implementation
A
global class WebServiceClass {
private Boolean helperMethod() { /* implementation ... */ }
global String updateRecords() { /* implementation ... */ }
B
webservice class WebServiceClass {
global static String updateRecords() { /* implementation ... */ }
C
webservice static String updateRecords() { /* implementation ... */ }
D
webservice class WebserviceClass {
for(Account thisAccount : [Select Id, Industry FROM Account LIMIT 259]) {
if(thisAccount.Industry == 'Technology'){
thisAccount.Is_Tech__c = true;
update thisAccount;
A. @AuraEnabled(Cacheable=true)
B. @AuraEnabled
C. @RemoteAction
D. @RemoteAction(Cacheable=true)
for(Account thisAccount : [Select Id, Industry FROM Account LIMIT 150]){
thisAccount.is_Tech__c = true;
for(account a: Trigger.new){
if(a.AnnualRevenue > 1000000){
List<Opportunity> oppList = [SELECT Id FROM Opportunity WHERE accountId = :a.Id];
if(oppList.size() == 0){
Opportunity oppty = new Opportunity(Name = a.name, StageName = 'Prospecting',
loseDate = system.today().addDays(30));
insert oppty;
public static List<Lead> obtainAllFields(Set<Id> leadIds){
List<Lead> result = new List();
for(id leadId : leadIds){
result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);
return result;
List<Case> casesToUpdate = new List<Case>();
for(Case thisCase : [SELECT Id, Status FROM Case LIMIT 50000]) {
thisCase.Status = 'Working';
casesToUpdate.add(thisCase);
try{
Database.update(casesToUpdate,false);
}catch(Exception e){
System.debug(e.getMessage());
Account myAccount = new Account(Name = 'MyAccount');
Insert myAccount;
For (Integer x = 0; x < 250; x++) {
Account newAccount = new Account(Name='MyAccount' + x);
try {
Insert newAccount;
}catch (Exception ex) {
System.debug(ex);
insert new Account (Name='myAccount');
List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=`˜NoContacts'];
public MyController(ApexPages.StandardController stdController){
account = (Account)stdController.getRecord();
public MyController(){
account = new Account();
public MyController(SObject obj){
account = (Account) obj;
public MyController(List objects){
accounts = (List)objects;
List childCases = new List<Case>();
for (Case parent : Trigger.new) {
Case child = new Case(ParentId = parent.Id,Subject = parent.Subject);
childCases.add(child);
insert childCases;