+ Start a Discussion

Scontrol for task HELP

Hi all,



I have built a pretty cool little app where the user selects from a list of questions on a custom object called "CSI" what tasks they would like to add to the Account. The ones they have selected, the workflow creates a task for them. The questions are listed on a Custom Object called "CSI" and is a master-detail to the Account.


I need to have the ability to display a figure showing how many of these CSI tasks have been completed and how many havent. Obviously it cant be a roll-up or a cross object formula, so it needs to be a scontrol.


Any ideas guys??


Cheers in advance.




I would create the fields at the account level and display them there. On the CSI object I would use a trigger or the soon to be released cross-object workflow (need to wait until early Feb for the new release if you want to use workflow) to update the number of tasks selected which will equal the number not completed.


Then a trigger at task level, when a task is completed, decrease the uncompleted counter by one and increase the completed one by one.


Unsure if this can be done with an S-Control... I would do it as explained.


Best of luck,




I have put a field on the Account page using Rollup fields displaying how many tasks have been created, but having trouble with the Trigger to calculate how many have been completed and how many havent.


Have you got an example i can work from? anything i can tweak to suit this need?


Thanks J!




I don´t have an example, sorry. But here are some thoughts:


Create the trigger on the task object. When a task is completed, if it is one of the CSI ones (you should have a means to identify them) have the trigger update the Account to alter the counter fields so that NumCompleted increases by one and NumPending decreases by one.