I am adapting a Access database application, that is an internal order system.
I have the following tables:
Products
| ProductId |
ProductName |
| 1 |
Product1 |
| 2 |
Product2 |
Orders
| OrderId |
Owner |
| 1 |
User1 |
| 2 |
User1 |
OrderItems
| OrderId |
ProductId |
Quantity |
| 1 |
1 |
10 |
| 1 |
2 |
10 |
So, I created a custom entity for these, set up the 1:N relationship between the orders and orderitems, and a lookup that reads the products in an orderitem. This is a direct conversion from the database, not sure, if this is the best approach. Suggestions welcome.
I have problems with the default "Name" primary column as I do not really need this for the orders and orderitems, at least not filled by the end users. The best would be if I could pre-fill this field with the primary key. I am trying to as much out of the box functionality, and I didn't find any way to do this. Tried to use rules, but I cannot select the Id field, because it is number. I also tried to change the primary field column data type, but there's no other possibility than text. I can see that I can make it optional, but this would make other operations like search and lookup difficult.
Can someone please point me to the right direction?