{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function end_window, msg, send_event, post_event\r\ndeclare subroutine record_lock\r\n$insert logical\r\n\r\nWafInvID = .waf_inv_no->text\r\nopen 'SYSLISTS' to SysListsTable else\r\n    Void = msg( '', 'Unable to open SYSLISTS...' )\r\n    return 0\r\nend\r\nPrevWindow = get_property( @window, '@PrevWindow' )\r\nRecordId = 'WAFER_INV*':@station\r\nrecord_lock( SysListsTable, 'SysLists', RecordId )\r\nwritev WafInvID on SysListsTable, RecordId, 1 else\r\n    Void = msg( '', 'Unable to write ':WafInvID:' on SYSLISTS ':RecordId )\r\n    return 0\r\nend\r\nunlock SysListsTable, RecordId else\r\n    Void = msg( '', 'Unable to unlock SYSLISTS ':RecordId )\r\n    return 0\r\nend\r\nopen 'WAFER_INV' to WafInvTable else\r\n    Void = msg( '', 'Unable to open WAFER_INV...' )\r\n    return 0\r\nend\r\nunlock WafInvTable, WafInvID else\r\n    Void = msg( '', 'Unable to unlock WAFER_INV ':WafInvID )\r\n    return 0\r\nend\r\nVoid = send_event( @window, 'WRITE' )\r\nVoid = end_window( @window, '' )\r\nif PrevWindow = 'Order' then\r\n   Void = post_event( 'ORDER.ORDER_DETAIL', 'OMNIEVENT', 'WAFER_INV' )      \r\nend\r\nRETURN 0"
        }
    }
}