Post

3 followers Follow
0
Avatar

Timesheet Custom Actions

Is there a way to create a custom action at the timesheet level, accessing CurrentObject() without there being an entry on the selected cell? I'm trying to create a series of custom actions that present different forms to record different activities

The custom action would be available based upon the work item's parent project type. So, for example, if a person selects a date/work item cell where the task's parent project  that is of type X, enable a timesheet custom action that will present the form that collects the correct data for that type of work. If it's of type Y, the first custom action would not be enabled, but a different one, showing a different form would be. 

The problem I'm having is that I can't seem to get a custom action to enable if there's not a timesheet already in the selected cell. 

Brunswick Lowe Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Odd, it sounds like something that should work. The workflow rule should check the type and then if a timesheet record exists, and if it does, continue to an action. Is that how it's setup?

Guy 0 votes
Comment actions Permalink
0
Avatar

Not exactly. It doesn't check for the presence of the timesheet. 

Currently, the only way the custom action button will enable, is if you select a cell that already has a timesheet in it. I need the action/button enabled BEFORE a timesheet exists AND if there's one there already. 

Brunswick Lowe 0 votes
Comment actions Permalink
0
Avatar

Hi,

To achieve the requirements, you specified, I would like to recommend a bit different approach. Seems like the main object is the work item - perhaps task - as we need to determine the project type of the parent. I would suggest creating a custom action on a task level. Within this custom action you can code the conditional action to check the project type and based on the desired values call another custom action appropriate for the selection.  Once you call the second custom action it will present different set of input based on the requirements per project type. Within the second action you will collect the data such as Reported Date, Duration, Comment …etc and use add new to create the timesheet as per the screen capture below. The Current Object will be the selected work item (task) which will be linked to the newly created time entry.

 http://screencast.com/t/OntGIwHwCyP

Please let me know your thoughts.

Bea Genthner 0 votes
Comment actions Permalink
0
Avatar

Thanks, Bea. I thought about that too, and i may use it as a fall-back. One thing I didn't mention is that the particular users I'm trying to satisfy are quite fond of reporting through the timesheet module due to the ability to see the grid with a week's worth of days on it. The CA I put together works for editing an existing timesheet record, but it doesn't work for selecting a date then creating a new one. 

I had also thought of trying to keep one form and use a dependent custom field that filtered the available values based on...what, I'm not sure...maybe a formula set custom value on the timesheet object or something...

There are a lot of possibilities, each with a small but important hump to overcome!

Thanks for putting some thought to it, though! 

Brunswick Lowe 0 votes
Comment actions Permalink