You need to sign in to do that
Don't have an account?

activate trigger
I am new to Salesforce.com. I am following the example in the Force.com IDE manual and created the trigger and class, however, when I add an Account, the Description field is not populated with "Hello World". So it seems my trigger and class are not getting activated.
Also, when I went to save in Eclipse, I got a message that it was not in sync with the organization, but I continued anyway. My class and trigger are saved on the site though so it seems things are ok.
Also, when I went to save in Eclipse, I got a message that it was not in sync with the organization, but I continued anyway. My class and trigger are saved on the site though so it seems things are ok.
I just figured it out. I have to save the account first. I was thrown by the “before insert” thinking it would appear in the dialog before I do the save (insert).
I am truly a newbie.
Thank you for your guidance.
All Answers
Post the trigger/class code so that all can check for the issue. There are multiple reasons for it :
1. Trigger may be not active
2. Trigger events are not correct
3. Code is not saved on salesforce
Regards,
Ajay
I tried same code in my developer org and its working as expected.
Do check if your org is having any other triggers or process builder or workflow causing the problem.
Regards,
Ajay
When I try to test it, I go to the "Service" app, Accounts tab and click the "New" button. I then scroll down to the "Description" field and it is not populated with the text. Is that what you did? If not, please tell me what you did so I can do the same. As for other triggers, etc., I just created this developer org yesterday morning so there should be nothing else on it other than this trigger and class.
Thanks,
David.
I found that if I add an account through the Developer Console, the trigger is fired and works fine. Is it not expected to work when adding an Account interactively?
Thanks,
David.
I just figured it out. I have to save the account first. I was thrown by the “before insert” thinking it would appear in the dialog before I do the save (insert).
I am truly a newbie.
Thank you for your guidance.
Yes, you need to click save to see the result.
I will suggest mark any of yours or my answer as best answer and mark it resolved.
Regards,
Ajay