• Version
      Version 13 Version 14 - Beta
  • Docs
  • Tutorial
  • GitHub
  • Learn
    • Getting Started
      • Introduction
      • Prerequisites
      • Installation
      • Tutorial
        • Frappe Framework Tutorial
        • Install and Setup Bench
        • Create an App
        • Create a Site
        • Create a DocType
        • DocType Features
        • Controller Methods
        • Types of DocType
        • Form Scripts
        • Web View Pages
        • What's Next?
      • Guides
        • Guides
        • Basics
          • Frappe Apps
          • Contribute Translations
          • Frappe Ajax Call
          • How to Enable Backup Encryption
          • Sites
          • Translations
        • App Development
          • Executing Code On Doctype Events
          • How To Improve A Standard Control
          • Running Background Jobs
          • Adding Custom Button To Form
          • Trigger Event On Deletion Of Grid Row
          • Dialogs Types
          • Overriding Link Query By Custom Script
          • Set up a new Connected App
          • Custom Module Icon
          • Insert A Document Via Api
          • How To Create Custom Fields During App Installation
          • Using Html Templates In Javascript
          • How to Enable Developer Mode in Frappe
          • Fetch a Field Value from a Document into a Transaction
          • Adding Module Icons On Desktop
          • Single Type Doctype
          • Prerequisites
          • Adding Social Login Provider
          • Exporting Customizations to your App
        • Deployment
          • Packages
          • Email Notifications For Failed Background Jobs
          • How To Migrate Doctype Changes To Production
          • Migrations
          • How To Enable Social Logins
        • Reports and Printing
          • Getting Information From Another Document In Print Format
          • Where Do I Find Standard Print Formats
          • How To Make Query Report
          • Report Print Formats
          • Script Report
        • Portal Development
          • Pages
          • Ordering
          • Adding Pages
          • Table of Contents
          • Dynamic Pages
          • Portal Roles
          • Customizing Web Forms
          • Generators
          • Redirects
        • Data
          • Using the Data Migration Tool
          • Import Large Csv File
        • Integration
          • Google GSuite
          • Token based authentication
          • OpenID Connect and Frappe social login
          • Webhooks
          • Social Login Key
          • Google Calendar Integration
          • How to setup OAuth 2?
          • Token based authentication
          • Rest Api
            • Introduction
            • Simple Authentication
            • Token Based Authentication
            • OAuth 2
            • Listing documents
            • Manipulating DocTypes
        • Database Settings
          • Setup read operations from slave/secondary mysql system
          • Postgres Database Setup
        • Automated Testing
          • Automated Testing
          • Unit Testing
          • UI Integration Testing
          • UI Testing with Frappe API
        • Desk
          • Desk Customization
          • Formatter For Link Fields
          • Making Charts
    • Basics
      • What is Frappe Framework?
      • Why Frappe Framework?
      • Architecture
      • Directory structure
      • Apps
      • Sites
      • Understanding DocTypes
      • Users and Permissions
      • Asset Bundling
      • Static Assets
      • Configuration
      • Doctypes
        • DocStatus
        • Module
        • DocField
        • Field Types
        • Naming
        • Controllers
        • Form & View Settings
        • Child / Table DocType
        • Single DocType
        • Actions and Links
        • Customizing DocTypes
    • Desk
      • Desk
      • Reports
      • Printing
      • Attachments
      • Scripting
      • Reports
        • Script Report
        • Query Report
        • Report Builder
      • Scripting
        • Client Script
        • System Console
        • Server Script
        • Script API
    • Portal
      • Discussions
      • Portal Pages
      • Web Forms
      • Blog Post
    • Python API
      • Document API
      • Database API
      • Jinja API
      • Request Lifecycle
      • Language Resolution
      • Utility Functions
      • Responses
      • Search
      • Hooks
      • REST API
      • FullTextSearch API
      • Dialog API
      • Query Builder
    • JS API
      • Developer API
      • Form Scripts
      • Controls
      • List
      • Page API
      • Tree
      • Common Utilities API
      • Dialog API
      • Chart API
      • Scanner API
      • Server Calls (AJAX)
      • Logging
      • Form Tours
    • Integration
      • Razorpay
        • RazorPay
      • Google Drive
        • Google Drive
      • LDAP
        • Setting up LDAP
      • Rest Api
    • Videos
      • Video Tutorials for Frappe Framework
    • Bench
      • Bench
      • Bench Commands
      • Frappe Commands
      • Bench - Extending the CLI
      • Resources
        • Background Services
        • Bench Commands Cheatsheet
        • Bench Procfile
      • Guides
        • Adding Custom Domains to your Site
        • Configuring HTTPS
        • Diagnosing The Scheduler
        • Using Let's Encrypt to setup HTTPS
        • Manual Setup
        • Setting Limits for your Site
        • Setup Multitenancy
        • Setup Production
      • Reference
        • Commands Reference
        • bench new-site
        • bench drop-site
        • bench migrate
        • bench backup
        • bench reinstall
        • bench list-apps
        • bench uninstall-app
        • bench show-config
        • bench set-config
        • bench restore
        • bench partial-restore
        • bench version
        • bench transform-database
        • bench trim-database
        • bench trim-tables
    • Deployment
      • Database Migrations
      • Production Setup
      • Rate Limiting
    • Writing Tests
      • Testing
      • UI Testing
    • Help
      • Debugging
      • How to contribute
      • Profiling
      • Translations
      • Logging

  • Getting Started
    • Introduction
    • Prerequisites
    • Installation
    • Tutorial
      • Frappe Framework Tutorial
      • Install and Setup Bench
      • Create an App
      • Create a Site
      • Create a DocType
      • DocType Features
      • Controller Methods
      • Types of DocType
      • Form Scripts
      • Web View Pages
      • What's Next?
    • Guides
      • Guides
      • Basics
        • Frappe Apps
        • Contribute Translations
        • Frappe Ajax Call
        • How to Enable Backup Encryption
        • Sites
        • Translations
      • App Development
        • Executing Code On Doctype Events
        • How To Improve A Standard Control
        • Running Background Jobs
        • Adding Custom Button To Form
        • Trigger Event On Deletion Of Grid Row
        • Dialogs Types
        • Overriding Link Query By Custom Script
        • Set up a new Connected App
        • Custom Module Icon
        • Insert A Document Via Api
        • How To Create Custom Fields During App Installation
        • Using Html Templates In Javascript
        • How to Enable Developer Mode in Frappe
        • Fetch a Field Value from a Document into a Transaction
        • Adding Module Icons On Desktop
        • Single Type Doctype
        • Prerequisites
        • Adding Social Login Provider
        • Exporting Customizations to your App
      • Deployment
        • Packages
        • Email Notifications For Failed Background Jobs
        • How To Migrate Doctype Changes To Production
        • Migrations
        • How To Enable Social Logins
      • Reports and Printing
        • Getting Information From Another Document In Print Format
        • Where Do I Find Standard Print Formats
        • How To Make Query Report
        • Report Print Formats
        • Script Report
      • Portal Development
        • Pages
        • Ordering
        • Adding Pages
        • Table of Contents
        • Dynamic Pages
        • Portal Roles
        • Customizing Web Forms
        • Generators
        • Redirects
      • Data
        • Using the Data Migration Tool
        • Import Large Csv File
      • Integration
        • Google GSuite
        • Token based authentication
        • OpenID Connect and Frappe social login
        • Webhooks
        • Social Login Key
        • Google Calendar Integration
        • How to setup OAuth 2?
        • Token based authentication
        • Rest Api
          • Introduction
          • Simple Authentication
          • Token Based Authentication
          • OAuth 2
          • Listing documents
          • Manipulating DocTypes
      • Database Settings
        • Setup read operations from slave/secondary mysql system
        • Postgres Database Setup
      • Automated Testing
        • Automated Testing
        • Unit Testing
        • UI Integration Testing
        • UI Testing with Frappe API
      • Desk
        • Desk Customization
        • Formatter For Link Fields
        • Making Charts
  • Basics
    • What is Frappe Framework?
    • Why Frappe Framework?
    • Architecture
    • Directory structure
    • Apps
    • Sites
    • Understanding DocTypes
    • Users and Permissions
    • Asset Bundling
    • Static Assets
    • Configuration
    • Doctypes
      • DocStatus
      • Module
      • DocField
      • Field Types
      • Naming
      • Controllers
      • Form & View Settings
      • Child / Table DocType
      • Single DocType
      • Actions and Links
      • Customizing DocTypes
  • Desk
    • Desk
    • Reports
    • Printing
    • Attachments
    • Scripting
    • Reports
      • Script Report
      • Query Report
      • Report Builder
    • Scripting
      • Client Script
      • System Console
      • Server Script
      • Script API
  • Portal
    • Discussions
    • Portal Pages
    • Web Forms
    • Blog Post
  • Python API
    • Document API
    • Database API
    • Jinja API
    • Request Lifecycle
    • Language Resolution
    • Utility Functions
    • Responses
    • Search
    • Hooks
    • REST API
    • FullTextSearch API
    • Dialog API
    • Query Builder
  • JS API
    • Developer API
    • Form Scripts
    • Controls
    • List
    • Page API
    • Tree
    • Common Utilities API
    • Dialog API
    • Chart API
    • Scanner API
    • Server Calls (AJAX)
    • Logging
    • Form Tours
  • Integration
    • Razorpay
      • RazorPay
    • Google Drive
      • Google Drive
    • LDAP
      • Setting up LDAP
    • Rest Api
  • Videos
    • Video Tutorials for Frappe Framework
  • Bench
    • Bench
    • Bench Commands
    • Frappe Commands
    • Bench - Extending the CLI
    • Resources
      • Background Services
      • Bench Commands Cheatsheet
      • Bench Procfile
    • Guides
      • Adding Custom Domains to your Site
      • Configuring HTTPS
      • Diagnosing The Scheduler
      • Using Let's Encrypt to setup HTTPS
      • Manual Setup
      • Setting Limits for your Site
      • Setup Multitenancy
      • Setup Production
    • Reference
      • Commands Reference
      • bench new-site
      • bench drop-site
      • bench migrate
      • bench backup
      • bench reinstall
      • bench list-apps
      • bench uninstall-app
      • bench show-config
      • bench set-config
      • bench restore
      • bench partial-restore
      • bench version
      • bench transform-database
      • bench trim-database
      • bench trim-tables
  • Deployment
    • Database Migrations
    • Production Setup
    • Rate Limiting
  • Writing Tests
    • Testing
    • UI Testing
  • Help
    • Debugging
    • How to contribute
    • Profiling
    • Translations
    • Logging
  1. What is Frappe Framework?
  2. Understanding DocTypes
  3. Actions and Links

Actions and Links

Added in Version 12.1

Action and Links (also called Connections) are two ways to provide the end user more interaction with the document. The image below shows what they are :

Action and Link View

Actions

A DocType may have some DocType Action that will result in a button creation on the DocType View. Supported actions are:

  1. Server Action: This will trigger a whitelisted server action.
  2. Route: This will redirect to a given route.

Configuration of Action

Action Configuraton

Configuration of Action in custom app

To call an Action in you own app, you will need a python function decorated with frappe.whitelist :

import frappe

@frappe.whitelist()
def execute_function(*args,**kwargs):
    """
    This fonction will be executed when the Execute Action Button will be clicked
    """
    print('Hello World')
    # The data is transmitted via keyword argument
    print(kwargs)

This code should go somewhere inside you app, typically in a file like apps/my_app/my_app/api.py

And then, configure the correspondant Action path :

Custom Action Configuraton

Connections (Linked Documents)

A standard navigation aid to the DocType view is the Connections section on the dashboard. This helps the viewer identify at a glance which document types are connected to this DocType and can quickly create new related documents.

These links also support adding internal links (links to DocType in child tables).

Configuration Connections

Link Configuration

Internal Link

Customization of Actions and Links

DocType Actions and Links are extensible via Customize Form

    aurélien_cibrario edited 3 months ago ·
  • 2 Revisions 
  • Edit Page 
  • New Page 
Left Right
On this page
  • Actions
    • Configuration of Action
    • Configuration of Action in custom app
  • Connections (Linked Documents)
    • Configuration Connections
    • Customization of Actions and Links
Footer Logo
Getting Started
  • Introduction
  • Installation
  • Tutorial
  • Guides
  • Frappe School
Basics
  • What is Frappe?
  • Architecture
  • Apps
  • Sites
  • User Permissions
Admin UI
  • Desk
  • Reports
  • Printing
  • Scripting
  • Translations
Deployment
  • Bench
  • Production Setup
  • Migrations
  • Rate Limiting
Forum Frappe Docs GitHub
© Frappe. Content licensed under CC-BY-SA 3.0.
+91 22 4897 0555 - hello@frappe.io

Built on Frappe