Post

2 followers Follow
0
Avatar

Problems with Getlink in Timesheet

Hi all,

 i want to make a validation rule which should only allow a timesheet if the user is assigned to the Task as a ressource.

So i used :

isnull(GetLink('ResourceLink',$WorkItem,CurrentUser()))

But this wont work. I get also a Link if the user inst assigned as a ressource to the task. It looks like i always get a link if the user was  assigned to the task in the past, but actually isnt. 

What iam doing wrong? Can somebody help?

Günter Denz Answered

Official comment

Avatar

Hi Gunter,

I think that the link is created by the system when they are creating a timesheet so your evaluation criteria returns TRUE. Before trying to solve this, my suggestion is to look into using the 8.2 People can assign themselves to work items system setting. Setting it to Don't Allow might be able to solve the issue.

Alternatively, you could try to use the following to see if the link has just been created and treat that as self-assignment via timesheet creation: IsNew(GetLink("ResourceLink", CurrentObject(), CurrentUser()))

If that does not work, you could also compare the ResourceLink creation time with Now() to determine if it was just created.

I hope this helps.

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

1 comment