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 |
The equivalent parameters were added to the PROCESSPICK subprogram in the CWSVXABPS treatment:
In the CWSVXABPS treatment, the parameters are put in local variables before they are used in the PROCESSPICK subprogram.
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.
The four technical fields were also added to the mutation parameters. This allows for the override of these fields in a page extension.
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
-
Four new columns to the STOPREH table. These columns need to be added to the specific package with the respective property names:
-
Four new fields in the PRH0 screen:
-
In the CWSVXABPS treatment, F class is assigned to the variables when the Pick Ticket turns deliverable.
- The node binding is validated so the node dictionary is updated.
- A specific package
-
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:
-
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.
-
Run the following commands:
npm run clean:install npm run build npm run start
-
In mobile automation:
-
The fields are visible and enabled
-
Click on the Submit button.
-
-
In Sage X3, the four fields are displayed with the right values: