Задайте вопросЗадайте вопрос
 

ОтвеченоHow to CAML query workflow tasks assigned to other users?

  • 12 июня 2008 г. 15:57JunHOV Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    Hello,

     

    I am trying to do a CAML query to get all the workflow tasks assigned to a specific user, not the current context user. The query would be something like below:

     

    <Eq><FieldRef Name='AssignedTo'/><Value Type='Integer'>17</Value></Eq>

    or

    <Eq><FieldRef Name='AssignedTo'/><Value Type='User'>[user ID]</Value></Eq>

     

    However, none of the above approaches works. Putting an Integer there gave me exception and putting userID there finds no result. Some post mentioned that using a user name instead of userID will work, but this is not a good approach since users can have duplicate names and my users basically don't have names.

     

    I know putting <UserID/> as value returns tasks for the current user. Please let me know what should be put in as AssignedTo Value and Type to get tasks for other users. BTW, the script is running on admin account, so there is no permission issue to see other users tasks. Please advise on the right approach.

     

    Thanks,

    Jun

Ответы

Все ответы