Solution of Salesforce Trailhead - Control Processes with Queueable Apex

preview_player
Показать описание
#salesforce #trailhead #codding
Solution of Salesforce Trailhead - Control Processes with Queueable Apex

This trailhead is a part of Asynchronous Apex Module.

Asynchronous Apex Module Link -

Asynchronous Apex Module is a part of Apex Specialist Superbadge.

Apex Specialist Superbadge Link -
Рекомендации по теме
Комментарии
Автор

where accountId in (SELECT Id from AccountId WHERE BillingState='CA')
^
ERROR at Row:1:Column:64
sObject type 'AccountId' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

spartangaming
Автор

Aree bhai source code bhi daal diya kro apne discription box

atulgupta-g
Автор

The addprimaryContact class did not achieve 100%code coverage methods. Make sure that you chose Run all tests in the developer console at least once before attempting to verify the challenge (problem please help me Bro)

CvcCvc-whrp
Автор

The Apex class doesn't appear to be implementing the Queueable interface.

when i tired to check the challenge it shows like this

jayapradeesh
Автор

if (primaryContacts.size() > 0) { insert primaryContacts;

chakrig
Автор

public class AddPrimaryContact implements Queueable{

private Contact con;
private String state;


public AddPrimaryContact(Contact con, String state){
this.con = con;
this.state=state;

}

public void execute(QueueableContext context){
List<Account> accounts = [Select Id, Name, (Select FirstName, LastName, Id from contacts)
from Account where BillingState = :state Limit 200];

List<Contact> primaryContacts = new List<Contact>();

for(Account acc:accounts){
Contact c = con.Clone();
c.AccountId = acc.Id;
primaryContacts.add(c);
}

if(primaryContacts.size() > 0){
insert primaryContacts;
}
}
}

Cyrus_Michael