Create Transactional Entities
Key Lesson: In this step, you learn how to create transactional entities and configure the properties that define the business data they store.
Create four transactional entities: PurchaseRequest, PurchaseRequestItem, Quotation, and QuotationItem.
Creating a new entity
Section titled “Creating a new entity”Use these steps each time you create an entity:
- Go to Design.
- Select Entity under Object Types.
- Click + to create a new entity.
1. Purchase Request entity (Header)
Section titled “1. Purchase Request entity (Header)”- Follow the Creating a new entity steps.
- Enter PurchaseRequest in the Id field and click OK.
- In the GENERAL section of the editor, set the Id type type to number.
Insight
When choosing data types, you can use the standard TypeScript types (string, number, and boolean) supported by Lowgile.
- Add the following properties:
| NAME | TYPE | Notes |
|---|---|---|
| costCenter | | Lookup to the CostCenter static entity. Leave the default expression property empty to force the user to choose a cost center. |
| comment | string | Stores the comment entered by the Approver when reviewing the Purchase Request. |
-
Leave all other properties at their default values.
Tip
Typing This. in the Type or Default expression field displays suggestions for the static and transactional entities available in the module.
-
Save and close the editor.
2. Purchase Request Item (Detail)
Section titled “2. Purchase Request Item (Detail)”- Follow the Creating a new entity steps.
- Enter PurchaseRequestItem and click OK.
- Set the ID type to number.
- Add the following properties:
| NAME | TYPE | DEFAULT EXPRESSION | Notes |
|---|---|---|---|
| description | string | (leave blank) | Item description |
| quantity | number | 1 | Requested quantity |
| unitPrice | number | (leave blank) | Price per unit |
| budgetAmount | number | (leave blank) | Budget allocation for this line |
| currency | | | Lookup to the Currency static entity |
-
Leave all other properties at their default values.
-
Save and close the editor.
3. Quotation (Header)
Section titled “3. Quotation (Header)”- Follow the Creating a new entity steps.
- Enter Quotation and click OK.
- Set the ID type to number.
- Add the following properties:
| NAME | TYPE | DEFAULT EXPRESSION | Notes |
|---|---|---|---|
| vendor | string | (leave blank) | Supplier providing the quotation |
| currency | | | Lookup to the Currency static entity |
-
Leave all other properties at their default values.
-
Save and close the editor.
4. Quotation Item (Detail)
Section titled “4. Quotation Item (Detail)”- Enter QuotationItem and click OK.
- Set the ID type to number.
- Add the following properties:
| NAME | TYPE | Notes |
|---|---|---|
| description | string | Line item description |
| quantity | number | Quantity quoted |
| unitPrice | number | Vendor’s unit price |
-
Leave all other properties at their default values.
-
Save and close the editor.