# GetTasksForPerson - Advanced Documentation ## Overview Fetches tasks assigned to or created by a person with paging, sorting, and filtering support. Respects the **ManageTasks** permission - users without it can only view their own tasks. ## Permission Behavior **Critical:** Without **ManageTasks** permission, the `PersonID` parameter is silently overridden to the current user's ID. This means: - Users WITH ManageTasks can view any person's tasks - Users WITHOUT ManageTasks always see only their own tasks, regardless of PersonID passed ## Paging Defaults If `Options` is null, defaults are: - Page: 1 - PageSize: 100 - Skip: 0 - Take: 100 - Sort: by `Owner.Name` ascending ## Sorting Supports sorting by: - `Owner.Name` - task owner - `CreatedBy.Name` - task creator - Any other field name from the TaskInfo model ## Script Example ```javascript async () => { const result = await SecureApi.GetTasksForPerson( 8514, // PersonID false, // ShowCompletedTasks false, // AssignedByMe { page: 1, pageSize: 20, skip: 0, take: 20 } ); return { total: result.Total, tasks: result.Data.map(t => ({ description: t.Description, owner: t.Owner?.Name, due: t.DateDue, claim: t.Claim?.Name, completed: t.Completed })) }; } ```