@dpoggemann , I'm going to create an accounting application.
It includes accounting for valuables in the warehouse,
also accounting and control of leased equipment.
A separate database will store all historical data on the arrival, consumption and movement of goods in the warehouse.
For example table "Inventory stocks":
field RecordType - expense or receipt
fields "Warehouse", "item", "Date", "Recorder" - are analitic
fields "Quantity", "Amount" - resources
So I can evaluate item quantity at any point of time.
I will use this table to check if quantity is enough to sell and of course the table will be used to build items movement report.
+ Warehouse1 Item1 "2023/06/05" "purchase 1" 3 90
- Warehouse1 Item1 "2023/06/06" "moving 1" 2 60
+ Warehouse2 Item1 "2023/06/06" "moving 1" 2 60
So I can see the balance on "2023/06/06" and later
Warehouse1 Item1 1 30
Warehouse2 Item1 2 60
It's not a good way to use Dataverse for this data and it is very difficult and hard to use PA or JS + Xrm.WebApi.online to manipulate DB.
So i'm going to use Stored SQL procedures and plugins.