All,
After much digging around, I found the answer on my own. As I suspected,
there is a flag in the database not getting set when Outlook items are synced
from offline to online. Apparently, the ActivitiesTable has an 'isBillable'
field which gets flagged correctly with True when you are Offline and when
your Online.
In addition, BCM uses ActivityCategoriesTable to mark and suppress the
Billable button on Activities like Task and Meeting in the BCM GUI (User
Interface). Further, to make things more frustrating, it does NOT use
ActivityCategoriesTable for Phone Logs (another inconsistency).
I checked the Offline database in the laptop and BOTH Tables are marked
correctly depending if is a Task or Phone Log. So the BUG lies within the
SYNC procedure or code that handles the sync between offline and online
database. When syncing, it is transferring over the ActivityCategoriesTable
which in turn sets the Billable GUI button for Task, but fails to set
isBillable=True (even though the Offline DB has it set). Finally, for Phone
Logs marked Billable, after syncing the isBillable=NULL. I am sure some
Programmer forgot to MAP the field correctly.
Of course, the Accounting Tools - Submit Billable Time function in BCM uses
a Stored Procedure (ir_RetrieveSBAActivities), which in turn is only looking
for isBillable=True, so the synced Outlook items are never pulled.
The Semi-good news is that Tasks and Meetings have Category set when you
click Billable in GUI, so ActivityCategoriesTable has a record in it that can
be detected after syncing.
The following query will reveal these items:
SELECT *
FROM ActivitiesTable INNER JOIN
ActivityCategoriesTable ON ActivitiesTable.ActivityID
= ActivityCategoriesTable.ActivityID
WHERE (ActivitiesTable.IsBillable IS NULL) AND
(ActivityCategoriesTable.CategoryName = N'Billable')
I have put an UPDATE query in ir_RetrieveSBAActivities so that these items
show when the Accounting Tools - Submit Billable Time command is clicked.
However, I still have issue with Phone Logs because someone decided NOT to
add the Category for Phone Logs, but it is ok for Meetings and Task when the
Billable button is clicked.
I hope this helps in the next service pack and more importantly helps some
companies recover lost revenue!