Entries by Christian Nilsson

Handle huge datasets from 3rd party Integrations

ServiceNows OOB challenges around receiving large amounts of data (read response packs greater than 32 Mb for data type string). To go around the challenge, I’ve solved it by saving the reply as an attachment (data type: String) var r = new sn_ws.RESTMessageV2(“xxxx”, “yyyy”); r.setBasicAuth(ssss, rrrr); var response = r.execute(); response.waitForResponse(200); //Write the huge attachment […]

A simple way to show a ServiceNow Modal for editing

Can be used to create e.g. related record Create a UI action and enter at least following: (Insert/Update=checked,client=checked,Onclick=openModalForm(),form button=checked) //Show modal with a view (form) for xxx table function openModalForm() { var modalForm = new GlideModalForm(‘Title’ /*Name the modal Title*/ , ‘task’ /*Table for the new record*/ ); modalForm.setOnloadCallback(formOnLoadCallback); modalForm.setCompletionCallback(formAfterSubmitCallback); modalForm.render(); } function formOnLoadCallback() { //Access […]