Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
...
ContactWorld call lifecycle overview
The following information describes the lifecycle of a ContactWorld call. This information demonstrates the importance of taking care when customizing ContactWorld and Salesforce.
Expand | ||
---|---|---|
| ||
Whenever a call takes place, our package performs the following actions. All actions happen in the context of one of two users:
Unless otherwise described, all actions happen in the context of the current user.
These operations are all internal to our package, and can change between package versions. Therefore we discourage customizing or interacting with these objects directly. |
...
Best practices when creating triggers
Triggers and automation cause the most issues when customizing ContactWorld or Salesforce. If you experience an issue with ContactWorld in Salesforce, support will ask you to disable your custom triggers. This enables us to verify that the standard installation is working.
Create easy-to-disable triggers
...
Expand | ||
---|---|---|
| ||
Trigger-bulkification is a Salesforce technique. Using trigger-bulkification, triggers can handle creation or updates of more than one record at a time. This technique helps avoid hitting governor limits on your triggers during a mass creation or update. Bulkifying means grouping up all your data manipulation operations into as few operations as possible. In practical terms, this usually means moving such operations outside of for-loops. For more information about bulkifying triggers, see Salesforce help and http://blog.jeffdouglas.com/2009/04/20/writing-bulk-triggers-for-salesforce/. |
...
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
Performing data-manipulation (DML) operations in triggers that run after record inserts or updates can cause trigger looping. For example, a task object has a trigger which modifies a lead, and a lead object has a trigger that modifies a task. The task's trigger initiates the lead's trigger, and then the lead's trigger initiates the task's trigger, and so on. This situation results in an endless loop of trigger execution. To avoid this situation, wherever possible, use triggers that run before update or insert. DML is not allowed in triggers that run before update or insert. If you cannot run your triggers before insert or update, use the following code. The code protects your triggers from firing repeatedly by checking whether they are already executing:
The
For more information about avoiding trigger looping, see Salesforce help. |
Best practices when writing queries for large data sets
Non-selective queries can fail if you run the query on more than 100,000 records. If your organisation handles a large volume of phone calls, the number of ContactWorld records can exceed that limit over time.
Make your queries selective
Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
The following fields in our custom objects are indexed:
If you have to query our objects, use these fields in the WHERE clause to make the query selective. Alternatively, to protect your code from selectivity issues, surround your queries in try-catch blocks:
For more information on how to make your queries selective, see :https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-make-my-SOQL-query-selective&language=en_US |
...
Validation rules on some objects or fields can prevent our managed package from creating objects. If you experience an issue with ContactWorld in Salesforce, support will ask you to disable your custom validation rules. This enables us to verify that the standard installation is working.
Create easy-to-disable validation rules
...
Custom flows and processes can cause issues when customizing ContactWorld or Salesforce. If you experience an issue with ContactWorld in Salesforce, support will ask you to disable your custom flows and processes rules. This enables us to verify that the standard installation is working.
Create easy-to-disable processes
...
At the end of a call, a trigger creates a task record relating to that call. To avoid causing issues in ContactWorld, when you create task triggers or flows, take care not to interfere with this feature. The best way to avoid issues is to identify and handle ContactWorld tasks differently.
...
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
Sometimes you might want to know the number of tasks related to a specific Salesforce object, for example, a contact or lead. You can use this number in reports later. The easy, but not recommended, way to count tasks is to use a trigger. The trigger updates the count in a custom field on the related record. This method is likely to cause concurrent editing issues. Instead we recommend you use an embedded Visualforce page to view a count of related task records. To create a Visualforce page and embed it in the page layout, perform the following steps:
|
...
- We recommend that you do not modify or delete dial list or dial entry records. Modifying or deleting these records can result in Connect being unable to log calls.
- We recommend that if you want to keep dial lists up to date, you should follow our instructions. For information about refreshing dial lists, see Dynamic Dial List refreshingLists.
Info |
---|
You can read the values in dial list and dial entry records with no issues. |