I'm a complete n00b at this and am eternally grateful for any assistance.
The goal is to automated round robin lead assignments. I’ve installed the Round Robin Record Assignment app which is designed for Cases, but as others have said here and elsewhere, it needs some modification to make it work for Leads. I’ve followed the instructions to create the triggers leadOwnerUpdate and leadRoundRobin based on what was built in for Cases (I would link to the page where I got the leadRoundRobin code, but I can’t seem to find it right now – it’s basically using Lead instead of Case in these new triggers). I also created a class called TestMethodCls4 which is based on what’s included for the package for testing Cases, but it’s saying I’ve only got 66% test coverage when I try to deploy the two new triggers and class from the Sandbox to the Enterprise account.
Can anyone provide any assistance as to how I should update my test class to get at least 9% more coverage? I've been up almost the entire night working on this and researching what I could find online, so this is a last resort. Thank you in advance!
Hello, until now I've found ways to use workflow rules to update fields but for this scenario I think I need to build a trigger. I'm new to Apex code too.
I have a survey form from a third party app that creates new survey results in a survey object. One of the fields captured is an order ID from an Order object that the survey relates to. I'd like to record when a survey is completed in the order record, mainly to display or filter it in a view. I've created a date/time field in the order object and want to trigger the current time to be entered when a new survey is created where the order ID's are the same. Can anyone please help with the apex code or trigger code here. Thanks in advance.
Please let me know what all things we need to take care while writing a Trigger,
- How to decide before or after trigger to use
- What all configurations we need to go through
- Batch size
- How to bulkify a Trigger
- How to avoid hitting Governor Limits
- Loops, and any other best practices to implement
Apart from above points, please include other points if I missed out any.