I have a multi-select picklist on a Task record that has about 22 choices for the reps to choose from. They now want to assign time spent on each of the selected choices from the picklist. I don't want to have to create 22 checkboxes in order to pull this off.

What would be ideal is that once the task is saved, a trigger will move the choices into fields that would allow them to add the time spent on each choice in minutes. I have no idea on how to do this and am way over my head. Suggestions?

  • 1
    I'm having a hard time visualizing exactly what you want. Do you have a mock-up or screen shot or something that could help make this more clear? And I suspect you might be able to find out if it is possible, but this sounds like too complex a question to get all the details of how to do it here.
    – pchittum
    Aug 29, 2014 at 19:49
  • Is there a maximum number of choices they would make in this field? I'm picturing that if they choose "a;b;c" in the multi-select that there would be 6 more fields: task activity 1 name and task activity 1 time spent and likewise for activity 2 and 3. Aug 29, 2014 at 22:42
  • this will be a maintenance issue as you are proposing 22 custom fields and a very large Task edit/detail page. Every time you add a new picklist, the metadata + apex code has to change
    – cropredy
    Aug 29, 2014 at 22:43

3 Answers 3


I see two ways to tackle this. 1) Create a custom button on task. When you click on the button, another VF page will open. It will check what values the user has selected in the choices multi select picklist and generate input text boxes dynamically. So for eg. if the user has selected A, B, C as choices, the page will have 3 input texts. User can then enter the time and hit save. We can then store this result in a rich text area or text area long field on task. Result will be like, A - 10 mins B- 20 mins C - 30 mins This will not be useful in reports. 2) Create a VF page with button in it. And put it as inline VF page in task layout and follow the way given in point #1.

Thanks, Shailesh


So are you looking to have someone record how much time they spent on each "sub task" within the MSP? I think description of the business case would be helpful. If you are wanting people to have an over-arching task and then within that particular tasks with time spent on each, you may want to use something like Milestones PM (free app) where you have a particular "milestone" and then individual tasks which make up that larger goal. Each task could then have a field for time spent on that task.


It would be redundant to store both an MSP of choices and the amount of time each choice took. If a choice's hours = 0, then it wasn't done.

So you could replace your MSP with 22 number fields, and users could enter hours for each choice instead of selecting MSP values.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .