Skip to content
Developerhome
X3

Custom script mutation - Customization on STO_PREH_PICK_TICKET

  Less than to read

This page summarizes what specific fields can be enterable on the Pick Ticket transaction for mobile automation, how to pass these fields into a mutation, and how to see the results of the mutation on Sage X3.

In Sage X3

In Sage X3, four parameters were added to the STO_PREH_PICK_TICKET operation:

Parameter Type
ICUSTO01 boolean
ICUSTO02 decimal
ICUSTO03 string
ICUSTO04 date

STO_PREH_PICK_TICKET parameters

The equivalent parameters were added to the PROCESSPICK subprogram in the CWSVXABPS treatment:

PROCESSPICK subprogram

In the CWSVXABPS treatment, the parameters are put in local variables before they are used in the PROCESSPICK subprogram.

parameters in local variables

In Sage X3 Services

On Sage X3 Services, for the standard MobilePickTicketViewLine and MobilePickTicketViewLineGlobal page, four technical fields were added.

These fields are hidden and read-only.

Each field corresponds to one parameter.

4 hidden read-only fields

The four technical fields were also added to the mutation parameters. This allows for the override of these fields in a page extension.

STO_PREH_PICK_TICKET parameters

Use case

The following example illustrates how to add four fields to the STOPREH table:

  • Packing request

  • Packing number

  • Packing text

  • Packing date

These fields are entered in mobile automation when the Pick Ticket turns deliverable. This can be achieved with customization.

To add the four fields, you must add to:

  • Sage X3

    • A specific package
      A specific package
    • Four new columns to the STOPREH table. These columns need to be added to the specific package with the respective property names:
      4 new columns

    • Four new fields in the PRH0 screen:
      4 new fields

    • In the CWSVXABPS treatment, F class is assigned to the variables when the Pick Ticket turns deliverable.
      assignation of class F

    • The node binding is validated so the node dictionary is updated.
  • Sage X3 Services

    • The nodes are generated with the new dictionary. Therefore, a specific package and a node extension is created for the Pick Ticket with the four new fields:
      A specific package and a node extension

    • Two page extensions are created. One for the mobilePickTicketViewLine and one for the pickticketViewLineGlobal. For these page extensions, the fields are overridden to show them (isHidden: false), to be able to enter them (isReadOnly: false), and to give them a title.
      two page extensions

    • Run the following commands:

        npm run clean:install 
        npm run build 
        npm run start 
      
    • In mobile automation:

      • The fields are visible and enabled
        Fields shown

      • Click on the Submit button.
        Fields filled

In Sage X3, the four fields are displayed with the right values:

4 fields displayed right