Post

2 followers Follow
0
Avatar

GetObjectViewURL - Timesheet Approvals

Case: When a timesheet approver (e.g. - PM or Direct Manager(DM)) "reopens" a timesheet within the Approvals module, that causes a WFR to run that uses the reopening of a timesheet as "rejecting" those time entries.

The WFR triggers a pop-up notification that will link to the Custom Action for the PM/DM to submit the rejection date and note that then gets emailed to the resource, but whenever the pop-up appears and the link is clicked, I get the error below on the new page.

Here's the current function that leads to that page: {Hyperlink(GetCustomActionUrl('Test Custom Action for Reject Time Entry',GetRunTimeParameter(CurrentObject()),GetHiddenRunTimeParameter('RejectedBy'),GetHiddenRunTimeParameter('RejectionDate'),GetHiddenRunTimeParameter('RejectionNote')))}

There is not an example of the GetObjectViewURL function on the success site, but should that function be used in this case? I can find the Basic View Timesheets External ID, but where would I get the other needed data to complete the function?{GetObjectViewUrl(objectId,viewId,expirationDate,register,moreInfo)}

Matt Bures Answered

Please sign in to leave a comment.

6 comments

0
Avatar

Hi Matt,

I was able to reproduce this. However, I think it may be the designed behaviour, because every time such link is generated for other types of objects, clicking that link first takes the user to the object's details view and then the custom action is executed. Timesheets do not have object details views.

Please allow me to check with our Product Team on what the expected behaviour is.

Thank you,

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Thanks Roland. If that's the expected behavior, should the same be expected if trying to include the function in an email or would the GetCustomActionURL possibly work from within the body of an email notification?

Matt Bures 0 votes
Comment actions Permalink
0
Avatar

Hi Matt,

I think it would fail from anywhere. Product Team confirmed this is the designed behaviour, but I'm trying to find out if there's a workaround, although I doubt it.

I will let you know.

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Thanks Roland and I appreciate the effort. I definitely feel like I'm at a roadblock trying to figure out the most efficient way for the team to be able to "reject" timesheets since the Approvals module does not offer that option. Any ideas are definitely appreciated.

Matt Bures 0 votes
Comment actions Permalink
0
Avatar

Hello Matt,

Maybe you could remove the option to reopen timesheets via the "Mark As" dropdown and only allow custom actions to do this?

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Are you referencing "Mark As" within the Timesheets module? I'm assuming so since it's not present within Approvals.

Do PMs have the ability to view assigned project resources' timesheets for a given week or can a View be built within Timesheets to show a specific PM's resources' reported time for a given week? I've tried to build a new View in the sandbox that shows the Task Resources, Created By, Role, Parent Project, and Work Item name, but I don't think it's possible to to filter as a PM and show assigned resources' time entries. If it is possible, please let me know and this could potentially be a HUGE workaround by hiding several of the Ribbon buttons and having the approvals run through a Custom Action.

Matt Bures 0 votes
Comment actions Permalink