Here's a common problem we get at support, so I decided to write something about it, I hope it helps people.
When ever you create custom dropdowns in the status section for calls and meetings, the coded business logic doesn't look for your custom statuses. Even if it did, it wouldn't know whether it was a HISTORY item or an ACTIVITIES item in the subpanel.
The Result? Your meetings and calls aren't displayed in the activities or history subpanel when you assign them a status other than the "out of the box" values.
Also, they won't show up on the home page.
There is an easy fix and here's a quick explanation of it:
Custom status dropdowns
Dropdowns are arrays that contain KEYS and VALUES. The KEY of a dropdown is what is inserted into the database and thus is intergral to the logic of SugarCRM.
VALUES of a dropdown are arbiturary and only for the display on the screen.
If new KEYS and VALUE are added to a dropdown, often business logic is disrupted and the KEY needs to be added to the underlying code to query the database to produce the expected results.
EXAMPLE 1.: Adding a new status to Calls
If a new KEY and VALUE are added to the 'call_status_dom' dropdown; SugarCRM will need to be modified to accomidate the new KEY.
For example, if we add 'Voicemail' to call_status_dom a custom array - the array with the keys and values will be added to ./custom/include/language/en_us.lang.php (or the language in question). See the below example of the custom language file array:
Now we must add the new STATUS to the business logic. First we must determine if this is going to be apart of the ACTIVITIES subpanel or the HISTORY Subpanel. For this example, I will make it apart of the Activities SubPanel - but the process is nearly identical for History SubPanel.PHP Code:<?php
$app_list_strings['call_status_dom'] = array (
'Planned' => 'Planned',
'Held' => 'Held',
'Voicemail => 'Voicemail,
'Not Held' => 'Not Held',
);
?>
Go to ./modules/Calls/subpanel/ForActivities.php, in the array $subpanel_layout find the sub-array that looks like this:
And change to fit new business logic, like this:PHP Code:'where' => "(calls.status='Planned')",
The steps are identical for ./modules/Calls/subpanel/ForHistory.phpPHP Code:'where' => "(calls.status='Planned' OR calls.status='Voicemail')",
Finally, to ensure that this appointment appears on the HOME page under "Upcoming Appointments", the following code must be altered as well:
In order to we must add the following line to the ./modules/Activities/config.php file
This will load up the $open_status array with values.PHP Code:$open_status[] = "Voicemail";
These values for $open_status should match the "open" status you create for meeting_status_dom and call_status_dom.


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks