{
    "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\nProdSpecID = .prod_spec_id->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 = 'PROD_SPEC*':@station\r\nrecord_lock( SysListsTable, 'SysLists', RecordId )\r\nwritev ProdSpecID on SysListsTable, RecordId, 1 else\r\n    Void = msg( '', 'Unable to write ':ProdSpecID:' 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 'PROD_SPEC' to PSTable else\r\n    Void = msg( '', 'Unable to open PROD_SPEC...' )\r\n    return 0\r\nend\r\nunlock PSTable, ProdSpecID else\r\n    Void = msg( '', 'Unable to unlock PROD_SPEC ':ProdSpecID )\r\n    return 0\r\nend\r\nVoid = send_event( @window, 'WRITE' )\r\nVoid = end_window( @window, '' )\r\nbegin case\r\n   case PrevWindow = 'Quote'\r\n      Multi = get_property( 'QUOTE', '@ChoosingMultiPSN' )      \r\n      if Multi then\r\n         Void = post_event( 'QUOTE.PREV_PSNS', 'OMNIEVENT' )      \r\n      end else\r\n         Void = post_event( 'QUOTE.PROD_SPEC_ID', 'OMNIEVENT' )\r\n      end\r\n   case PrevWindow = 'CAR'\r\n      Void = post_event( 'CAR.PROD_SPEC_ID', 'OMNIEVENT' )   \r\n   case PrevWindow = 'WO-Log'\r\n      Void = post_event( 'WO_LOG.PROD_SPEC_ID', 'OMNIEVENT' )   \r\n   case PrevWindow = 'Order'\r\n      Void = post_event( 'ORDER.ORDER_DETAIL', 'OMNIEVENT', 'PSN' )      \r\n   case PrevWindow = 'SRP'\r\n      Void = post_event( 'SRP_COC_RESULTS.PROD_SPEC_ID', 'OMNIEVENT' )      \r\nend case\r\nRETURN 0"
        }
    }
}