Application Integration
- Application Integration
- All Products
/** * @NApiVersion 2.x * @NScriptType UserEventScript */ define(['N/https', 'N/log'], function(https, log) { function afterSubmit(context) { if (context.type === context.UserEventType.CREATE || context.type === context.UserEventType.EDIT) { var newRecord = context.newRecord; var caseId = newRecord.id; var url = '{CAI process URL}?Input_Case_ID=' + caseId; try { var response = https.get({ url: url }); log.debug({ title: 'GET Request Response', details: 'Response: ' + response.body }); } catch (e) { log.error({ title: 'Error Sending GET Request', details: e.message }); } } } return { afterSubmit: afterSubmit }; });