{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function start_window, relational_call, security_check, msg, key_sort\r\ndeclare function rowexists, det_table_suff\r\ndeclare subroutine security_err_msg\r\n$insert msg_equates\r\n$insert security_rights_equ\r\n\r\nif .co_type->value = 'C' then\r\n    WindowToCall = 'NDA'\r\n    Table = 'NDA'\r\n    RightsToCheck = 'NDA'\r\n    SymKeys = 'NDA_KEYS'\r\n    PopupToCall = 'SHOW_NDA'\r\n\tif security_check( RightsToCheck, Read$ ) then\r\n\t    CoNo = .co_no->text\r\n\t    if CoNo then\r\n\t        if rowexists( 'COMPANY', CoNo ) then\r\n\t\t\t\tKeys = relational_call( 'COMPANY', SymKeys, CoNo, PopupToCall, Table, '#INIT_DATE' )\r\n\t\t\t\tif Keys then\r\n\t\t\t\t    swap 'NoKeys' with '' in Keys\r\n\t\t\t\t    ParamToPass = Keys\r\n      \t\t\t\tVoid = start_window( WindowToCall, '', ParamToPass:'*CENTER', '', '' )\r\n      \t\t    end\r\n\t\t    end else\r\n\t\t        MsgInfo = ''\r\n\t\t        MsgInfo<mtext$> = 'You must save this company first.'\r\n\t\t        MsgInfo<micon$> = '!'\r\n\t\t        Void = msg( '', MsgInfo )\r\n\t\t    end\r\n\t    end else\r\n\t        MsgRec = ''\r\n\t        MsgRec<mtext$> = 'You must retrieve a company first...' \r\n\t        MsgRec<micon$> = '!'\r\n\t        Void = msg( '', MsgRec )    \r\n\t    end\r\n\tend else\r\n\t    security_err_msg( RightsToCheck, Read$ )\r\n\tend\r\nend else\r\n   MsgInfo = ''\r\n   MsgInfo<mtext$> = 'You cannot enter a NDA for a company unless they are defined as a customer...'\r\n   MsgInfo<micon$> = '!'\r\n   Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0"
        }
    }
}