You need to sign in to do that
Don't have an account?
Gab Silvermotion
newbie apex code question
Hello, i need to modify the code of an existing trigger in our salesforce. the original trigger was coded by a firm we a no longer dealing with.
basically, the trigger automatically changes the stage of the opportunity depending on actions the sales rep are doing (calling, sending emails, receiving prospects in the sales office)
so here's the deal.
existing code :
if (e.Type != null && e.Type == 'Walk-In')
walkin++;
id like to modify it so the walkin+++ occurs not only when there is a event named ''walk-in", but also for all those containing "Meeting".
the event type "walk-in" is for when a prospect visits a sales office unnanounced. we added 1st meeting, 2nd meeting, 3rd meeting, 4th+ meeting as event types to log when the prospects visits after they have talked to a sales rep.
so i guess something like
If (e.Type !=null && (e.Type == ‘Walk-In’ || e.Type.contains(‘Meeting’))
Walkin++
??
thanks for the help, i'm new at apex development and it's a bit overwhelmong at first.
since i'm modifying an existing trigger, can i just change it in the dev console and save?
thank you!
basically, the trigger automatically changes the stage of the opportunity depending on actions the sales rep are doing (calling, sending emails, receiving prospects in the sales office)
so here's the deal.
existing code :
if (e.Type != null && e.Type == 'Walk-In')
walkin++;
id like to modify it so the walkin+++ occurs not only when there is a event named ''walk-in", but also for all those containing "Meeting".
the event type "walk-in" is for when a prospect visits a sales office unnanounced. we added 1st meeting, 2nd meeting, 3rd meeting, 4th+ meeting as event types to log when the prospects visits after they have talked to a sales rep.
so i guess something like
If (e.Type !=null && (e.Type == ‘Walk-In’ || e.Type.contains(‘Meeting’))
Walkin++
??
thanks for the help, i'm new at apex development and it's a bit overwhelmong at first.
since i'm modifying an existing trigger, can i just change it in the dev console and save?
thank you!
You can edit in the dev console but only in sandbox. For apex code (triggers and classes) you can't edit in production. So you'll need to edit it in a sandbox and then you can do a change set to push it to production.
All Answers
You can edit in the dev console but only in sandbox. For apex code (triggers and classes) you can't edit in production. So you'll need to edit it in a sandbox and then you can do a change set to push it to production.
Below is a salesforce.com article that explains more on the limitations of editing apex/triggers on production org.
http://help.salesforce.com/apex/HTViewSolution?id=000005267&language=en_US
Hope this answers your question !!
i'm searching the documentation on how to push it in production now. thank you very much!