• Bart__c
  • NEWBIE
  • 10 Points
  • Member since 2013


  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
In the 'Getting Started with APEX Triggers' (http://goo.gl/5YJ01q) module, an error message appears when attempting the first example/exercise. 
 The instructions read: 
  • 1. In the Developer Console, click File | New | Trigger. (The menu path is actually File | New | APEX Trigger).
  • 2. Enter helloWorldTrigger for the trigger name, and then select Account for the sObject. ClickSubmit. (stet)
When clicking submit in step 2, an error message appears: "The Trigger "HelloWorldTrigger " is not a legal name." The parenthesis around HelloWorldTrigger are not entered in step 2. 

Work Around:  
In Setup go Develop | Apex Triggers
Launch the Dev Console (DC) from setup UI. 
Removed previous text from within the Query Editor tab which contained an invalid query, and was promtping an error message itself.
Continued with set 2, above. 

I was able to save the new trigger in the Dev Console. I then deleted it, closed the DC, and repeated the steps from the Trailhead exercise (where the DC was launched from Name | Dev Console, not Setup | Develop). I was then able to save the trigger without error. 

Take Away: it may have been the erronous text in the query editor, when the DC was launched from Name | DC. Subsequently adding erronous text back into the query editor, and repeating set 2 above did not throw a naming error the second time.  
 
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.
In the 'Getting Started with APEX Triggers' (http://goo.gl/5YJ01q) module, an error message appears when attempting the first example/exercise. 
 The instructions read: 
  • 1. In the Developer Console, click File | New | Trigger. (The menu path is actually File | New | APEX Trigger).
  • 2. Enter helloWorldTrigger for the trigger name, and then select Account for the sObject. ClickSubmit. (stet)
When clicking submit in step 2, an error message appears: "The Trigger "HelloWorldTrigger " is not a legal name." The parenthesis around HelloWorldTrigger are not entered in step 2. 

Work Around:  
In Setup go Develop | Apex Triggers
Launch the Dev Console (DC) from setup UI. 
Removed previous text from within the Query Editor tab which contained an invalid query, and was promtping an error message itself.
Continued with set 2, above. 

I was able to save the new trigger in the Dev Console. I then deleted it, closed the DC, and repeated the steps from the Trailhead exercise (where the DC was launched from Name | Dev Console, not Setup | Develop). I was then able to save the trigger without error. 

Take Away: it may have been the erronous text in the query editor, when the DC was launched from Name | DC. Subsequently adding erronous text back into the query editor, and repeating set 2 above did not throw a naming error the second time.  
 
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.
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.