Customer Orders may be handled directly by customers using a self-service Customer Portal.
Here a Power Pages Customer Portal enables customers to view, create, and edit their orders in the context of a Business Central subscription.
I created a new table
I set the table name to Customer Order
I updated the Name column to be an Autonumber
I added a Requested Delivery Date column
I set the Time zone adjustment property of the Requested Delivery Date column
I added an Account (Customer) column
I created a Portal Active Customer Orders view
I added the Account and Requested Delivery Date columns to the view
I created a Portal Customer Order Main Form form
I created a Customer Orders page
Authenticated Users only
I added h1 text and a new List
I created the Active Customer Orders List based on the Customer Order table
I create a table permission allowing customers to view their Customer Orders
I selected the Read, Update, Create and Delete permissions and Authenticated Users
I updated the Portal Customer Order Main Form
I tested the Customer Orders page
I added a New Customer Order page
I added h1 text and a Form
I created a New Customer Order (Power Pages/Basic) form
The contents entered into the New Customer Order form will be used to create a new order
On Submit the user will be redirected to the Customer Orders form
I disabled CAPTCHA
I disabled form filling assistance
I set the New Customer Order page's permissions
I updated the Customer Orders Create a new record list action
I clicked the Create button
I selected a Requested Delivery Date and clicked the Submit button
I could not see the new Customer Order
I created a Customer Orders app
I added the Customer Order table
Saved the changes. I clicked the Back button
I selected the Customer Orders app and clicked the Play menu item
I could see the new Customer Order
I switched to the Portal Active Customer Orders view
The Account value has not been provided
I selected the New Customer Order (Basic) form. I clicked the + New Basic Form Metadata button
I selected type Attribute and Attribute Logical Name Account
I clicked the Save Value On Save checkbox and selected the Current Portal User | Company Name value
The Basic Form Metadata details are shown in the grid
I scrolled to the right hand side of the grid
I added a second Customer Order
The Account Value was set
I added an Edit Customer Order page
I added h1 text and a Form
I created an Edit Customer Order (Power Pages/Basic) Form
This form will allow the user to update an existing Customer Order
On Submit the user will be redirected to the Customer Orders page
I disabled CAPTCHA
I disabled form filling assistance
I set page permissions to Authenticated Users
I updated the Customer Order's Edit record action
I clicked the edit button
I updated the Requested Delivery Date and clicked the Submit button. Notice that when I clicked the edit button the edit page's url includes the id of the order 14b67e1a... (the value of the hadd_customerorderid field).
The Customer Order was updated
I wanted user to be redirected from the New Customer Order page directly to the Edit Customer Order page. I updated the New Customer Order's On submit value.
I reviewed the Customer Order table
I reviewed the Customer Order (hadd_customerorderId) column
I reviewed the Customer Orders
I updated the New Customer Order Basic Form
I navigated to the On Success Settings tab. I added ...Parameter Name id and ...Attribute Logical Name hadd_customerorderid
I created a new Customer Order and clicked Submit
I was redirected to the Edit Customer page
I clicked Submit on the Edit Page and was redirected to the Customer Orders page