Task report not showing "Assigned" tasks

Certified Associate Developer

Hello!

I have a task report which shows tasks from all users that have the current logged in user as their supervisor.  

The problem I'm facing is that tasks with the status "Assigned" are not being shown in the report, which in turn creates a problem where if I reassign a task from someone it immediately goes to status "Assigned" and stops being shown in the report. 

Here is how I pick up tasks from my subordinates.

a!localVariables(
        local!currentUser: loggedInUser(),
        local!directReportUsers: a!queryRecordType(
          recordType: 'recordType!{SYSTEM_RECORD_TYPE_USER}User',
          fields: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.relationships.{SYSTEM_RECORD_TYPE_USER_RELATIONSHIP_directReportUsers}directReportUsers.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username',
          filters: a!queryFilter(
            field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username',
            operator: "=",
            value: local!currentUser
          ),
          pagingInfo: a!pagingInfo(
            startIndex: 1,
            batchSize: 100
          )
        ).data,
        local!reportUsers: local!directReportUsers['recordType!{SYSTEM_RECORD_TYPE_USER}User.relationships.{SYSTEM_RECORD_TYPE_USER_RELATIONSHIP_directReportUsers}directReportUsers.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username']

If anyone had the same problem or if anyone has any insights on this it would be greatly appreciated.

Jan

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data