Essa informação não está disponível em português, sendo exibida em inglês.
The following call settings can be initialized automatically:
- Call interval of customers based on a formula: see item 'Calculated call interval '
- Last customer call date according to existing data: see item 'Optional field initialization 'Last customer Call' '
If you would like to initialize additional fields when activating customers for portatour®, you can implement this using an Apex trigger.
Hint: The Professional Edition of Salesforce does not support Apex Triggers.
Below is an example of a Trigger that initializes the Call duration (CallDurationMinutes__c) depending on the rating of the respective Account:
trigger ExampleTrigger on pt__PTCustomerCallSettings__c (before insert) {
if(Trigger.isInsert && Trigger.isBefore){
List<ID> myAccountIDs = new List<ID>();
for (pt__PTCustomerCallSettings__c mySettings : Trigger.new) {
if (mySettings.pt__Account__c != null) {
myAccountIDs.Add(mySettings.pt__Account__c);
}
}
Map<ID, Account> myAccounts = new Map<ID, Account>(
[SELECT ID, Rating FROM Account WHERE ID IN :myAccountIDs]);
for (pt__PTCustomerCallSettings__c mySettings : Trigger.new) {
Account myAccount = myAccounts.get(mySettings.pt__Account__c);
if (myAccount != null) {
// Overwrite Call Duration for Hot Accounts
if (myAccount.Rating == 'Hot') {
mySettings.pt__CallDurationMinutes__c = 60;
}
}
}
}
}
Hint: Consult the portatour® Support Team prior to initializing Customer Call Settings with Triggers. Manipulation of data saved in portatour® custom objects may lead to unexpected effects and possibly malfunction of portatour®, or respectively, errors on default Salesforce pages containing portatour® objects.