Power Apps (Part 14)

Model Driven Purchase Order Lines

Model Driven Purchase Order Lines

I created a Power Platform Model Driven application to manage Business Central Purchase Order Lines.

I set the General Section to 2 columns and moved the Quick View form into that section. 

I set the General Tab to be 1 column

I added a new section below the General Section

I added a Purchase Order Lines Subgrid to the New Section (with the Show related records checkbox selected).

I hid the Section and Subgrid labels

A row was added to the Subgrid for every Purchase Order Line.

I navigated into the Business Central solution.

I added the "All Purchase Order Lines" view to the solution

I added the Amount Excluding Tax column to the All Purchase Order Lines view.

I clicked the Save & Publish button

I refreshed the Business Central app.

I added all of the other available columns to the view. I clicked the Save & Publish button

I refreshed the Business Central app.

I clicked the + New Purchase Order Line button

I clicked the Save button and the application generated an error.

I navigated to the Business Central solution

I added the Purchase Order Line Main Information form to the solution

I clicked the Edit button

I added the Line Type and Description fields

I ran the Business Central app. I tried to add a purchase order line.

I selected Line Type "Comment" and provided a Description

The application generated an error.

I added the Document Id to the form

I clicked the + New Purchase Order Line button again

The Document Id was automatically populated

I selected Line Type Comment.

I provided a Description and clicked the Save button. The record was saved and the Line Object No. field was updated (cleared)

The Purchase Order Line was shown in the Subgrid

When I selected the record the menu options changed.

I returned to the Business Central Configuration app and selected the Item table

I updated the Item table to Visible

I added the Item table to the Business Central solution

I clicked the Add button

I noticed that a Many-to-one relationship had been added to the Purchase Order Line table 

I reviewed the records in the Business Central Item table

I added the Item Id column to the Purchase Order Line table's Main form

I clicked the Save and publish button

I clicked the + New Purchase Order Line button

I selected an Item

I set the Line Type value to Item

I clicked the Save button (notice that I did not enter a description)

Once the record had been saved a Line Object No. value was generated

I clicked the back button to return to the Purchase Order form