Advanced Operation: Script, Server Script, Style, Extensions
## Overview
As a no-code development tool, Pleasanter allows you to quickly create business applications with simple operations.
As a low-code development tool, it also provides a wide range of "[Developer Function](/en/manual/dev)" such as "[Script](/en/manual/table-management-script)," "[Server Script](/en/manual/table-management-server-script)," "[API](https://pleasanter.org/en/manual/api)," and "「Extended SQL」", so it can handle complex business requirements that are difficult to achieve with standard functions alone.
Here is an overview of the developer functions.
## API
The "[API](https://pleasanter.org/en/manual/api)" provided by Pleasanter has the basic operations of registering, viewing, updating, and deleting sites and records, as well as the function of sending emails and executing arbitrary SQL.
By using the API, you can link data with other systems.
Pleasanter's API is a WEB API, so it can be used not only for API operations from external systems but also for batch processing using scripting languages such as Powershell and Python.
In addition, the "[Script](/en/manual/table-management-script)" described below can be used to create business logic such as retrieving data from tables in Pleasanter and registering, updating, and deleting.
## Script
It is possible to execute Javascript on the client side to perform UI operations that cannot be achieved with standard functions and additional processing associated with UI operations. In addition to plain Javascript, jQuery can be used for implementation. In addition to functions for retrieving record IDs and values of screen columns, functions that operate when displaying the list screen and before updating the edit screen, and functions dedicated to scripts such as functions for executing the Pleasanter API are available, so you can quickly and with high quality implement additional processes that cannot be realized with standard functions. In addition, by introducing external libraries, you can use various functions such as graph display and pivot tables on Pleasanter.
## Server script
Javascript can be executed on the server side to perform conditional branching, calculations, string processing, record operations, notifications to emails and chats, dynamic access control, etc. Plain Javascript can be used for implementation. In addition to retrieving data and retrieving records from other tables, there are a wide variety of methods and properties dedicated to server scripts, such as retrieving and updating screen setting information and setting view information, so you can quickly and with high quality implement additional processes that cannot be realized with standard functions.
## Difference between scripts and server scripts
The biggest difference between scripts and server scripts is where they run. Other differences are as follows.
|Contents|Script|Server script|
|:---|:---|:---|
|Location of action|Client side|Server side|
|Action trigger|Operation on the screen (displaying the screen, pressing a button, changing a value, etc.). Implement processing for each operation|Processing timing on the server side (before displaying the screen, after it is created, etc.). Details are defined in "Server script: Conditions". |
|External API call|Possible. Implemented with $.ajax, etc. For the Pleasanter API, there is a dedicated script ($p.api〇〇). |Possible. There is a dedicated method ("[httpClient](/ja/manual/server-script-http-client)")|
|Loading external libraries|Possible|Impossible|
## Style
You can specify a design that differs from the standard, such as changing the background color for each row on the list screen, changing the background color of a specified column, emphasizing the text of a specified column on the edit screen, and increasing the font size of buttons. Styles are written in CSS (Cascading Style Sheets). In addition to being able to set CSS in the settings of column on the list screen and edit screen, you can also set CSS in combination with various processes using scripts and server scripts.
## Extensions
In addition to "[Script](/en/manual/table-management-script)", "[Server Script](/en/manual/table-management-server-script)", "[API](https://pleasanter.org/en/manual/api)", and "[Style](/en/manual/table-management-style)", further extensions are available.
### Extended HTML
You can freely insert HTML at the top of the login screen input form. You can insert individual explanations without implementing a script.
### Extended SQL
You can add any SQL when data is reflected, such as before creating a record or after updating. By using this function, you can realize additional processes such as updating records in another table when creating a new record. By using the link server (SQL Server) or DB link (PostgreSQL) function, you can also execute SQL against a database in another system. Another function of extended SQL is to set a Where clause to limit the records displayed on the list screen and edit screen. By using this function, it is possible to realize record-level access control with more detailed conditions without using record access control. In addition, extended SQL can be executed from the API. By executing the API from scripts and server scripts, it is possible to implement processes that retrieve and update data directly from the database.
### Extended script, extended server script, extended style
Script, server script, and style are set on a table-by-table basis in "[Manage Table](/en/manual/table-management)", but in cases where they are used throughout Pleasanter, they can be managed collectively with this function.
### Extended navigation menu
The navigation menu in the upper right corner of the screen is set in the parameter file "NavigationMenu.json", but by using this function, it is possible to specify in detail the addition, replacement, and deletion of the navigation menu.
### Extended field
You can add columns that do not exist in the table to the filter on the list screen. By using this function, you can arbitrarily extend the search conditions.
### Extended column
You can add columns such as "[Class Column](/en/manual/table-management-class)" and "[Numeric Value Column](/en/manual/table-management-num)" to department management, group management, and user management.
## Related information
<div id="ManualList"><ul><li><a href="/en/manual/table-management">Manage Table</a><span>10.02.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-class">Table Management: Item: Classification</a><span>08.13.2024 up</span></li>
<li><a href="/en/manual/table-management-num">Manage Table: Column: Numerical Value</a><span>10.02.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-style">Table Management: Style</a><span>08.13.2024 up</span></li>
<li><a href="/en/manual/table-management-script">Table Management: Script</a><span>08.13.2024 up</span></li>
<li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/dev">Developer Function</a><span>08.14.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/server-script-http-client">Developer Function: Server Script: httpClient</a><span>10.04.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />