Step 2 — The Customers screen
The customers table becomes a screen: a grid with filters, an edit dialog, add and delete. Three places in Settings, in this order: Connectors (the queries), Screens (the interface), Menus (the entry that opens it).
At a glance
The queries
- Liberty Next → Build → Connectors, select
crm, choose Tables in the mode bar. - + Add queries → Generate from DB, pick the
customerstable. - Keep every column, tick key on
ID, keep the four statements. Save.
The connector now holds customers_get, customers_post, customers_put and customers_delete. Two adjustments in the query editor:
customers_post— the database numbers the rows (SERIAL), so removeIDfrom the insert, and stamp the creation:
INSERT INTO customers (NAME, INDUSTRY, COUNTRY, STATUS, PRIMARY_EMAIL, CREATED_BY, CREATED_AT)
VALUES (:NAME, :INDUSTRY, :COUNTRY, :STATUS, :PRIMARY_EMAIL, {{LOGIN}}, {{SYSTIMESTAMP}})
customers_put— leave the creation columns alone and stamp the change:
UPDATE customers
SET NAME = :NAME, INDUSTRY = :INDUSTRY, COUNTRY = :COUNTRY, STATUS = :STATUS,
PRIMARY_EMAIL = :PRIMARY_EMAIL, UPDATED_BY = {{LOGIN}}, UPDATED_AT = {{SYSTIMESTAMP}}
WHERE ID = :ID_ORIGINAL
{{LOGIN}} and {{SYSTIMESTAMP}} are filled by the server — the user name and the current time — whatever the form sends. Save the connector page.
Each query has its own permission — sql:crm:customers_get, sql:crm:customers_put… — used in Step 5. Superusers have them all.
The screen
- Liberty Next → Build → Screens → + Add scope, pick
crm: thecrmchip appears. - + Add screen, id
customers, then click the card to open the screen editor.
| Tab | Setting |
|---|---|
| General | Label Customers. |
| Queries | Read customers_get, update customers_put, insert customers_post, delete customers_delete. |
| Columns | Import from read query, then: label each column, hide ID, CREATED_BY, CREATED_AT, UPDATED_BY (hidden), tick filter on STATUS, COUNTRY and INDUSTRY. |
| Dialog | One tab Details with NAME, INDUSTRY, COUNTRY, STATUS, PRIMARY_EMAIL. |
Save. The labels typed on the columns can later move to the dictionary, which serves every screen — see Step 3.
The menu
- Liberty Next → Build → Menus → + Add scope, pick
crm: the app's empty tree appears. - + Folder: label
Sales, iconbriefcase. - On the folder, + Add child: label
Customers, typescreen, targetcustomers_get, iconusers. - Save.
crm now has a menu: it is an app, listed in the app picker at the top of the sidebar (with at least two apps). Its sidebar shows Sales → Customers.
See it work
Open Customers: the grid shows ACME Industries, Beta SARL and Gamma SA.
- Click a row: the dialog opens with the five fields; change one and Save — Updated by and Updated at are filled (show them from the Columns menu of the grid).
- + Add opens an empty dialog for a new customer.
- Delete in the dialog removes the row.
What you have now
A Customers screen — list, filters, add, edit, delete — built from one table, with audit columns stamped by the server.
→ Step 3 — Deals and relationships: lists of values from the dictionary, deals linked to customers, activities in a tab.