Post

1 follower Follow
0
Avatar

Custom Action - New Item - Assign Pick-list Values

I am working on a custom action on the Request entity, which will allow me to create a Task from a Request.  I have a field, Request Reason, which is a pick-list and I have created this on both the Request (C_RequestReason) and Task (C_TaskRequestReason) entities, with identical values.

As I am creating the Task in the custom action, I want to be able to pass along the value of Request Reason from the Request to the Task, but I am not having any luck.

I have tried to simply use the existing custom fields, $C_TaskRequestReason = $C_RequestReason (Request Reason from PickList.png attached) with no luck.

I also tried to ask for user input, and then use this variable to assing to $C_TaskRequestReason (Request Reason from User Input.png attached), but again with no luck.

Any ideas?

I also need to be able to designate the task as belonging to the To-Do list.

Thanks!

Chris

Chris Corbin Answered

Please sign in to leave a comment.

2 comments

0
Avatar

Chris,

Sorry you're having trouble.  Since we are working with pick lists (and not standard "text" or "text areas"), in the field setter, you must convert the value to a string with the ToString function, as follows: ToString($C_RequestReason)

Hope this helps!

Rob

Yoko Suzuki 0 votes
Comment actions Permalink
0
Avatar

Awesome!  Worked like a charm, thank you for the quick response Rob!

Any idea how to tie the task to the To-Do list?

Chris

Chris Corbin 0 votes
Comment actions Permalink