Post

3 followers Follow
0
Avatar

Custom Action to Change Resource State

I've had a request to build a Custom Action that's tripping me up a bit. This would be a Task-level Custom Action that sets the value of a Custom Field to a specific action (that's easy), and then sets the Resource State of the user that runs the CA (CurrentUser()?) to "Inactive," and sets the Project Manager's Resource State to "Active."

Is this possible? Thanks!

Doug Smith Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Were there any replies on how to make this happen?  I'm running into something similar with updating a resource on a task to inactive so as to not lose their timesheet entries during a different change.

Amanda Damstetter 0 votes
Comment actions Permalink
0
Avatar

Hello Doug and Amanda,

 

Please try the following and let me know if it works: 

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Hi Roland,

Thanks for the idea. What if the PM isn't already a Resource? I know there's a HasRole() function that should, in theory, be able to see if the PM is already a resource and whether they are active or inactive, but my CSM told me that function is buggy, and I've experienced that myself. If that function was an option, then a Conditional Action List could be used to check if the PM is already a Resource, and add them if not. But today, that apparently is not a viable solution.

Doug Smith 0 votes
Comment actions Permalink
0
Avatar

Hello Doug,

The following setup (or a variation of it) could be used to check if a user is a resource:

 

Please let me know if this helps.

Roland Pumputis 0 votes
Comment actions Permalink