QAD 2017 Enterprise Edition > User Guides > Planning and Scheduling Workbenches Administration > Personalization Architecture > Customization Scenarios > Add an Editable wo_mstr Column to a Default Column Display List and Save Updates
  
Add an Editable wo_mstr Column to a Default Column Display List and Save Updates
In this scenario, the field exists in the schema for the wo_mstr table. The system saves any changes you make to the column values in the database record.
1 Add the field to the additional default display fields list as described above in Specifying Additional Columns.
2 Add a column header label for the field as described above in Adding Column Header Labels.
3 Add the field to the additional default edit fields list as described above in Specifying Additional Columns.
In the Post Save Update user exit, add code to save the value of the field into the wo_mstr database record. The following example code writes the value of wo__chr04 to the database record:
 
/* woscpostupdatex.p - MSW/PSW Personalization Architecture user exit program */
/* Copyright 1986 QAD Inc. All rights reserved. */
/* $Id:: woscpostupdatex.p 4721 2013-04-04 20:52:09Z wug $: */
/*V8:ConvertMode=NoConvert */
 
/*
* Post Save Update user exit program
*
*/
 
define variable svnId{&SEQUENCE} as character no-undo initial "svnId $Id: woscpostupdatex.p 4721 2013-04-04 20:52:09Z wug $".
 
{mfdeclre.i}
{wodstt.i}
 
/*THE INPUT-OUTPUT PARAMETER DATASET REFERS TO A DATASET
*THAT IS DEFINED BY wodstt.i. THE TEMP-TABLES DEFINED IN
*THIS DATASET (tt-wo_mstr, tt-wod_det etc) CAN BE REFERENCED
*STATICALLY. THIS DATASET IS WHAT IS USED AS INPUT TO THE
*WO UPDATE API*/
 
define input parameter ipDomain as character no-undo.
define input parameter ipLot as character no-undo.
define input-output parameter dataset for dsWorkOrder.
define output parameter opSuccessful as logical no-undo initial true.
/*hdswoscwxad REFERS TO THE DATASET THAT IS SENT BY THE
*CLIENT. IT CONTAINS THE TEMP-TABLES tt-wo_mstr (defined
*BY woscwo.i/woscwox.i), tt-wod_det (defined by
*woscwod.i/woscwodx.i), and tt-wr_route (defined by
*woscwr.i). THE CONTENTS OF THIS DATASET WAS PREVIOUSLY
*LOADED INTO THE INPUT-OUTPUT PARAMETER DATASET.*/
 
define shared variable hdswoscwxad as handle no-undo.
 
/*hbtt-wo_mstr IS A HANDLE REFERENCING tt-wo_mstr. THE CONTENTS
*OF tt-wo_mstr CAN BE ACCESSED USING DYNAMIC TECHNIQUES. IT
*WOULD BE POSSIBLE TO TYPECAST hbtt-wo_mstr TO A PROCEDURE
*USING THE TABLE-HANDLE MECHANISM IF YOU WANTED TO USE THE
*woscwo.i/woscwox.i ETC STATIC DEFINITIONS.*/
 
define variable hbtt-wo_mstr as handle no-undo.
hbtt-wo_mstr = hdswoscwxad:get-buffer-handle("tt-wo_mstr").
 
/*your code goes here*/
 
find tt-wo_mstr where tt-wo_mstr.wo_domain = ipDomain
and tt-wo_mstr.wo_lot = ipLot
no-error.
 
if available tt-wo_mstr
and
(row-state(tt-wo_mstr) = ROW-CREATED or row-state(tt-wo_mstr) = ROW-MODIFIED)
then do:
find wo_mstr where wo_mstr.wo_domain = ipDomain
and wo_mstr.wo_lot = ipLot
exclusive-lock.
wo_mstr.wo__chr04 = tt-wo_mstr.wo__chr04.
end.
 
opSuccessful = true.