Skip to main content

Introduction: What Are Assignments and ToDos in Frappe?

Assignments and ToDos in Frappe Framework v15 provide a built-in task management system linked directly to DocTypes and documents.
They help teams track responsibilities, follow up on work, and ensure accountability inside ERPNext and custom Frappe apps.
Assignments are document-centric, while ToDos represent actionable tasks for users.

What Is an Assignment in Frappe?

An Assignment links a user to a specific document and indicates responsibility for action.

Key characteristics:

  • Attached to a DocType record
  • Visible in the Desk UI
  • Generates a ToDo automatically
  • Supports multiple assignees

Assignments ensure users know what needs attention and where.

What Is a ToDo in Frappe?

A ToDo is a task record that appears in a user’s task list.

ToDos can be:

  • Auto-generated from assignments
  • Created manually
  • Linked to documents
  • Used independently for reminders

The ToDo DocType stores task metadata such as owner, reference document, status, and description.

How Do Assignments and ToDos Work Together?

Every assignment creates a ToDo, but not every ToDo requires an assignment.

Workflow:

  1. A document is assigned to a user
  2. Frappe creates a linked ToDo
  3. The ToDo appears in the user’s Desk
  4. Completion updates task visibility

This tight coupling ensures tasks stay contextual.

How to Assign a Document in Frappe?

Documents can be assigned directly from the Desk UI.

Steps:

  • Open any document
  • Click the “Assign” option
  • Select one or more users
  • Add an optional comment

The assigned users instantly receive a ToDo and notification.

How to Create Assignments Programmatically?

Frappe provides built-in APIs for managing assignments.

Example: Assign a Document via Server Script

from frappe.desk.form.assign_to import add
add({
"assign_to": ["user@example.com"],
"doctype": "Sales Order",
"name": "SO-0001",
"description": "Follow up with customer"
})

✔ Verified for Frappe Framework v15
✔ Automatically creates a ToDo
✔ Triggers notifications

How to Remove an Assignment?

Assignments can be removed programmatically or from the UI.

Example: Remove Assignment

from frappe.desk.form.assign_to import remove
remove("Sales Order", "SO-0001", "user@example.com")

This also updates the related ToDo.

Where Are ToDos Stored?

ToDos are stored in the ToDo DocType.

Important fields include:

  • owner
  • reference_type
  • reference_name
  • status
  • description

Permissions are enforced using standard Frappe role rules.

How Are Notifications Handled?

Frappe automatically sends notifications when:

  • A document is assigned
  • A user is mentioned
  • A task is updated

Notifications appear in:

  • Desk notifications
  • Email (if enabled)

This ensures no task is missed.

Common Use Cases for Assignments & ToDos

  • Approval follow-ups
  • Sales and support task tracking
  • Workflow-driven responsibilities
  • Cross-team collaboration

Assignments keep work aligned with business processes.

Best Practices for Using Assignments

  • Assign only actionable documents
  • Avoid assigning too many users
  • Use clear task descriptions
  • Close assignments once completed

Well-managed assignments improve productivity.

Advanced Topics: Assignments in Workflows

Assignments integrate seamlessly with Frappe Workflows.

Use cases:

  • Auto-assign approvers at workflow states
  • Change assignees on state transitions
  • Enforce accountability in approvals

This makes workflows operationally effective.

Troubleshooting Common Issues

ToDo not visible?

  • Check user permissions
  • Verify assignment exists
  • Ensure the ToDo status is “Open”

Duplicate ToDos?

  • Avoid assigning the same user repeatedly
  • Use checks before programmatic assignment

Industry Relevance

Assignments & ToDos are widely used in:

  • ERP operations
  • Manufacturing workflows
  • Sales pipelines
  • Support ticketing systems

They scale across industries and team sizes.

Target Audience

  • ERPNext Users
  • Frappe Developers
  • Business Process Owners
  • Project Managers

Technical Prerequisites

  • Frappe Framework v15
  • Desk module enabled
  • User roles configured

Official References (Verified)

Official Documentation:

https://docs.frappe.io/framework/assignments-and-todos

Frappe GitHub (v15):

https://github.com/frappe/frappe/tree/version-15

Rating: 5 / 5 (2 votes)