Hello everyone. I have a contract entity that looks like this:
Inside the contract entity, I have contract lines with a N:1 relationship to the contract entity. My contract lines look like this:
As you can see inside my contract lines, I have two fields that stipulate if the contract line order is for AM SNACK/LUNCH/PM SNACK (Under serving time).
I want to take the data in each contract and spit out a table that looks like the table below. This would be adding each day's orders from the contract lines and printing the total in the table (Center group is the same as Serving group in the contract lines). The table would be for the entire contract, but would use the contract lines to generate the totals. If I had many contracts, many tables like this should be generated:
Inside the contract lines, I only have what's ordered for the week, even though the invoice is for the entire month. I took care of this by multiplying the total weekly by 4 and inserting it into the quantity field. This is because the number of units ordered for each separate week is the same.
My question is how on earth do I get Dynamics 365 to generate something like the table above from what I have inside each contract(with contract lines). I don't think this can be done using word/excel templates. I am thinking I would have to create a new entity and get it to generate these reports using processes/workflows. If not, then I could probably build a plugin. I just don't know the route to take here. Any help from the experts would be greatly appreciated!!