If your low code database includes client orders, a delivery agent may need to review order details using a mobile client app.
The simplest way to display details would be accessing the database via a browser, however, if a delivery agent should be able to confirm orders using a mobile action, you would need to generate a document including order details
1. Generated Document including order details
Firstly, generate a document you need. This document should include an order data along with related details, such as ordered items.
2. Formula-URL column
In the next step, you would need a Formula-URL column to build a URL referring to the created “Order Document” comprising ordered items.
The URL formula should include the record Id numbers, therefore first of all you need to create a Formula-Text column keeping the RecordId() function.
Then you can create the Formula-URL column comprising the following formula
"https://www.teamdesk.net/secure/api/v2/83590/02F639FFF7C24C509D67468A2DDF6529/Client%20Order/Order%20Document/document?Id=" & [Record ID formula]
Please note that the URL consists of the following elements:
URL Element | Description |
83590 | This is a database id number that is visible in database URL, for example: https://www.teamdesk.net/secure/db/83590/overview.aspx?t=939103 Your database will have a different number. |
02F639FFF7C24C509D67468A2DDF6529 | This is the REST API authorization token generated by the system. In your database you will use a different token. |
Client%20Order | This is the “Client Order” singular name of the table “Client Orders”, please note that spaces are replaced by “%20”. |
Order%20Document | This is the document name. In this example the document name is “Document A”. So, the space is replaced by “%20”. |
[Record ID formula] | This is the name of the formula-text column described above. |
3. Custom button with actions
Now you can configure a custom button with actions. The button will generate a document. Let’s name the button “Create Document & Send Order”.
This button will generate a document file and will insert it into the “Document File Attachment” column. Moreover, it will activate the Mobile Record Update action for a corresponding user, for instance for a delivery agent.
As the result, the agent will be able to review the “Order Document” keeping ordered items, and then check the “Completed” checkbox when the order is completed.
4. Save document as a file attachment – Update Record action
A Record Update action can use the created Formula-URL column to insert a generated document into the “Document File-Attachment” column of the file-attachment type.
5. Sending Order details to a mobile client app via a Mobile action.
To send a generated document as a file attachment to a user mobile phone, you need to create a Mobile record update action.
6. ReadOnly option for the Document File Attachment column
To display the file attachment in the Mobile Update Record action, the Readonly option must be set for the “Document File Attachment” column, otherwise the generated document attachment will not be visible in the mobile update record action. Using the Form Behavior settings, you can activate the “Readonly” option for the “Document File Attachment” column on the Edit form. Furthermore, other columns, such as “Contact” and “Delivery Date” columns/fields can be set as Readonly as well. You can adjust this form behavior only for the “Delivery Agent” role.
7. How the setup works
When an Order record with ordered items is created, you can click on the “Create Document & Send Order” custom button.
As the result, the document attachment will be generated, and the Mobile Update record action will be sent to an assigned user.
A user, who is a delivery agent, can open an “Order Document” attachment to review the ordered items.
When the Order is delivered, this delivery agent can check the “Completed” checkbox.