Amend Order Action
The gadget spec URL could not be found



The customers must be able to amend an existing order. They can either change the order quantity for a product or delete a product order. By default, the quantity input fields will be protected i.e. it is a read-only field. So when the "Amend Order" button is clicked, these fields must be made editable.

The product orders are stored in the "ProductOrders" model, which is the child model of "CustomerOrders". So when the "Amend Order" action is clicked, the attributes of the child model form field elements "Quantity" field and "Delete" button must be chaanged to editable. How can this be achieved?
  • Create an action "SetAmendOrder" in the "ProductOrders" model to set the "Amend_Order" flag.
  • Create an action "AmendOrder" in the "CustomerOrders" model to invoke the "SetAmendOrder" action to set the flag and make the fields editable.

Set amend order flag
  
 Open the "ProductOrders" data model. Create a public cell "Amend_Order" and set the format to boolean.

Open the action design perspective and create a new action "SetAmendOrder".This action will be invoked from the parent CustomerOrders model to set the amend order flag.
  
Insert an update command.
   
Click on the properties tab to configure the command parameters .

Param: Amend_Order
Value: =1



Amend Order Action
  
Insert a "CallChidAction" command.
   
Call child action command is used to call a child model action. The child model action will be executed.

What parameters must be configured for "CallChildAction" command?
  • Child Model
  • Child Action Name
  • Context Cell Name
  
Click on the properties tab to configure the command parameters.

Child-Name: Order_ID(ProductOrders)
Child-Action-Name: SetAmendOrder
  
What's the next step?

Create "Confirm Order" action.