You need to sign in to do that
Don't have an account?
Bart__c
Trailhead: Unclear instructions re: "Getting Started with APEX" Unit 1: Call Static Method
I created the sendEmail class as was able to send/receive the email as the instructions indicated. However, under the section "Call Static Method" I ran into an error.
This instructions read:
" In the Developer Console, find the open tab for the EmailManager class and modify the first line of the sendMail() method definition to the following (the only change is the added static keyword.)
public static void sendMail(String address, String subject, String body) {
Save the class by pressing Ctrl+S. "
When I try to save, I get:
FIELD_INTEGRITY_ERROR:
Failed to create createContainerMember for containerId=undefined: null is not a valid containerId.
Here are the first few lines of the class (with the addition of the word 'static' per instructions)
public class EmailManager {
// Public method
public static void sendMail(String address, String subject, String body) {
// Create an email message object.....
Further, the page is now in a perminant 'saving' mode under the file menu. Thanks for any help.
This instructions read:
" In the Developer Console, find the open tab for the EmailManager class and modify the first line of the sendMail() method definition to the following (the only change is the added static keyword.)
public static void sendMail(String address, String subject, String body) {
Save the class by pressing Ctrl+S. "
When I try to save, I get:
FIELD_INTEGRITY_ERROR:
Failed to create createContainerMember for containerId=undefined: null is not a valid containerId.
Here are the first few lines of the class (with the addition of the word 'static' per instructions)
public class EmailManager {
// Public method
public static void sendMail(String address, String subject, String body) {
// Create an email message object.....
Further, the page is now in a perminant 'saving' mode under the file menu. Thanks for any help.
It sounds like you ran into a know issue with the developer console. There is a couple of things you can do:
1. Edit the class from Setup | Develop | Apex Classes
2. Create a new Workspace in the dev console - https://help.salesforce.com/apex/HTViewSolution?urlname=Developer-console-cannot-save-classes-triggers-pages&language=en_US
I hope that helps!
All Answers
It sounds like you ran into a know issue with the developer console. There is a couple of things you can do:
1. Edit the class from Setup | Develop | Apex Classes
2. Create a new Workspace in the dev console - https://help.salesforce.com/apex/HTViewSolution?urlname=Developer-console-cannot-save-classes-triggers-pages&language=en_US
I hope that helps!
Bart @ Forcesmith.com
Thank you,
Orchid