You need to sign in to do that
Don't have an account?
Kon Dele
Help with Apex Trigger that updates Account picklist.
Hello,
I'm new to coding and have been presented with the following task.
Create a trigger that runs each time an account is created or edited that updates a custom account picklist (Cold,Warm,Hot)as follows:
1) If there are 3 or fewer contacts update to Cold
2) if there are 4 to 9 contacts update to Warm
3) if there are 10 or more contacts Hot
I need help with designing the trigger syntax. Thanks
I'm new to coding and have been presented with the following task.
Create a trigger that runs each time an account is created or edited that updates a custom account picklist (Cold,Warm,Hot)as follows:
1) If there are 3 or fewer contacts update to Cold
2) if there are 4 to 9 contacts update to Warm
3) if there are 10 or more contacts Hot
I need help with designing the trigger syntax. Thanks
Please follow the links to understand in details about Triggers
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_qs_HelloWorld.htm
http://help.salesforce.com/apex/HTViewHelpDoc?id=code_define_trigger.htm
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables.htm
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables_considerations.htm
https://developer.salesforce.com/page/Apex_Code_Best_Practices
Hope this helps you.
Thanks
Vikash_SFDC