Client Script

Back to Custom

Overview

Client Script — Business-Focused Explanation

The Client Script document is used in Dafater to customize how users interact with forms and screens during their daily work. It allows businesses to adjust on-screen behavior so that data entry becomes faster, more accurate, and aligned with internal policies—without changing the core system processes.


What the Client Script is Used For in Business Operations

The Client Script helps businesses control and improve user experience at the point of data entry. It is used to:

In short, it ensures that employees follow business rules naturally as they work, rather than relying on training or manual checks.


Prerequisites or Setup Requirements

Before using Client Script, the following should be in place:


Typical Workflow and How It Fits into Business Processes

  1. Identify a Business Need
    For example, users frequently enter incorrect data, miss mandatory fields, or require guidance.

  2. Define the Desired Behavior
    Decide what should happen on the screen—such as auto-filling values, warnings, or field restrictions.

  3. Create a Client Script
    The Client Script is linked to a specific document so the behavior applies consistently.

  4. Test with Business Users
    Ensure the form behaves as expected and supports daily operations.

  5. Deploy and Monitor
    Once active, the Client Script becomes part of the normal workflow, improving efficiency and compliance.


Key Business Scenarios Where Client Script Is Essential


Important Considerations for Users


Summary

The Client Script is a powerful business tool in Dafater that shapes how users interact with forms. By embedding business logic directly into daily workflows, it improves data quality, enforces policies, and enhances user productivity—making it an essential component for organizations aiming for consistency and operational excellence.

Adds a custom client script to a DocType

Basic Information

Fields

Field Name Label Type Required Options Description
dt DocType Link DocType Target DocType where Dafater client script executes.
view Apply To Select List, Form Defines Dafater view where the script applies.
module Module (for export) Link Module Def Module used for exporting this Dafater client script.
enabled Enabled Check - Enable or disable this Dafater client script.
script Script Code JS JavaScript logic executed on the Dafater client side.
sample Sample HTML - Reference example to understand Dafater client script usage.

Permissions

Role Read Write Create Delete Submit Cancel
System Manager
Administrator
DocType Relationship Module
Module Def Links to Core