function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BAI-JonBAI-Jon 

Assigning newly created task to a different user?

I have a custom sControl that creates several cases with several task referenced to those cases.  It works great now, but i want to assign a couple of those tasks automatically to another user instead of the user that clicks the custom link.  I am trying to just set the "WhoId" field to that other users 18 char id like this:

Code:
userTestTask.set("WhoId", "xxxxxxxxxxxxxxxxxx");



 But it is not working.  What am i doing wrong?
BAI-JonBAI-Jon
Ok, i can't believe i did this, but i should have been using the "OwnerId" field, not the "WhoId" field.  Once i changed it, it works fine.  Jeeze...embarrassing