Salesforce Trailhead - Manipulate Records with DML

preview_player
Показать описание
Solution of Salesforce Trailhead - Manipulate Records with DML

This trailhead is a part of Apex Basics & Database Module.

Platform Development Basics Module is a part of Developer Beginner Trail.

Apex Basics & Database Module Link -

Developer Beginner Trail Link -
Рекомендации по теме
Комментарии
Автор

It is very useful to complete this trailhead thanku so much

jensit
Автор

This is the code ---Save time


public class AccountHandler {

public static Account insertNewAccount(String AccountName){
try {
Account newacct=new Account(Name=AccountName);
insert newacct;
return newacct;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
return null;
}
}
}

ayush_singh_
Автор

It was showing "there was an unexpected error in your org which is preventing this assessment check from completing to de-reference a null object"

chaitanyakiran
Автор

There is a error like accounthandler is not a legal name😢

alluarjunarmyonline
Автор

why i have this error: '11:37:28:035 USER_DEBUG [9]|DEBUG|Error: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Price__c, Target_Close_Date__c]: [Price__c, Target_Close_Date__c]'

chadimonla
Автор

Examples Chupichukunu CheSTEY Apex arthamavutundi, Like ee Video lo La

naveenadapa
Автор

What am I doing wrong? It keeps saying "Line: 1, Column: 16
Method does not exist or incorrect signature: void insertNewAccount(String) from the type AccountHandler" when I got to execute

public class AccountHandler {

public static Account insertNewAccount(String AccountName){
try {
Account newacct = new Account(Name=AccountName)
insert newacct;
return newacct;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
return null;
}
}

}

piecespurpose
Автор

public class AccountHandler{

public static Account insertNewAccount(String accountName){
try {
Account newacct = new Account(Name=accountName);
insert newacct;
return newacct;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
return null;
}
}

}

SVinay-wjqo
Автор

There was an unexpected error in your org which is preventing this assessment check from completing: System.NullPointerException: Attempt to de-reference a null object


it gives me this error

allenpernites
Автор

public class AccountHandler{
public static Account insertNewAccount(String accountName){
Account acctToBeInserted = new Account(Name=accountName);

try{
insert acctToBeInserted;
}catch(DMLException e){
System.debug('Inside DMLException catch, error is ' + e.getMessage());
acctToBeInserted = NULL;
}
return acctToBeInserted;
}
}

ilyassemoutaouakil