Develop > Document Engine > Work order example overview > Create a wizard for the work order

Create a wizard for the work order

This examples uses a wizard to create a work order because a wizard simplifies the task of opening a work order for the user and the functionality is already available in the system.

This example uses the wizard creation tool to create a wizard to allow users to create a work order from the Incident Management module. When a user creates a work order from an incident, the wizard prompts the user for information and auto-fills some of the fields in the work order.

To create a wizard for the work order form, follow these steps:

  1. From the System Navigator, click Tailoring > Wizards to open the Wizard Information form.
  2. Type Create Workorder - 1 in the Wizard Name field.
  3. Click Add to create the Wizard record.
  4. On the Wizard Info tab, enter the following information:

    Field Value
    Brief Description Create a new work order.
    Window Title Create Workorder
    Title Create Workorder
    Start Node Select (set to true) to indicate that this is the first wizard in a series of wizards in cases where you have a series of wizard records.
  5. Click Save.
  6. In the File Selection tab of the Wizard Information form, select the Select $L.file by tab.
  7. On the Select $L.file by tab, enter the following information:

    Field Value
    Create a record true
    of type EXWorkOrder
  8. Click Save.
  9. On the Usage tab, enter the following information:

    Field Value
    Wizard Usage Click Request user input in the Wizard Usage section.
    Sub Format to Display Type createWO.assigneeAndCIs
    Display Screen Type wizard.display
    Activate "Finish" option Select (set to true) to have a Finish button on the wizard form.
  10. Click Save.
  11. On the Actions tab, enter the following information:

    Field Value
    Perform Actions On Select Current File ($L.file).
    Actions to Perform >
    Expressions

    initiator in $L.file=operator()

    status in $L.file="New"

    RelatedID in $L.file=number in $relatedRec

    category in $L.file=category in $relatedRec

    impact in $L.file=initial.impact in $relatedRec

    urgency in $Lfile=severity in $relatedRec

    priority in $L.file=priority.code in $relatedRec

    Display Record(s) when complete? Click Display Record(s) when complete?
    Mode Select Add.
  12. Click Save.
  13. On the Cancel Expressions tab, enter the following information:

    Field Value
    Expressions Executed on Cancel cleanup($relatedRec)
  14. Click Save and then OK.