Skip to main content

Posts

Consuming a staging table endpoint & transform map using REST

whilst below works, developer site actually recommends the format: /api/now/import/<staging table_name> https://developer.servicenow.com/app.do#!/rest_api_doc?v=kingston&id=c_ImportSetAPI ------------------- web service endpoint created in a remote ServiceNow instance via system web services> create new, where the staging table name is  u_staging_table_xyz  and the requests are processed to the target table via a transform map SOAP wsdl to consume from another ServiceNow instance might be     https://<servicenowinstance>.service-now.com/u_staging_table_xyz.do?WSDL format for consuming this on REST would be:     https://<servicenowinstance>.service-now.com/ api/now/table/ u_staging_table_xyz   Example test harness for a POST operation  go to REST messages and create a new REST message as a test harness, and create a new http POST method: set up a basic authentication profile and configure the...

Bit of code I was looking at

var gdtBST = new GlideDateTime (); var tz = Packages . java . util . TimeZone . getTimeZone ( "Europe\London" ); gdtBST . setTZ ( tz ); gdtBST . setDisplayValue ( current . getDisplayValue ( 'opened_at' )); var dT = gdtBST . toString (); var dateSection = dT . split ( ' ' )[ 0 ]; //Gets the Date var timeSection = dT . split ( ' ' )[ 1 ]; //Gets the Time current . u_call_log_date = dateSection ; current . u_call_log_time = timeSection ;

AJAX call example 2: return single value

AJAX call example 2: return single value Client script code: //--author: RDS Feb 2018 function  onChange ( control ,  oldValue ,  newValue ,  isLoading )   {      if   ( isLoading  ||  newValue  ==   '' )   {          // return;      }      var ga = new GlideAjax ( 'fj_servicerequest_ajax' );     ga . addParam ( 'sysparm_name' , 'refreshItemDescription' );     ga . addParam ( 'sysparm_req_type' , newValue );     ga . addParam ( 'sysparm_req_category' , g_form . getValue ( 'fj_request_category' ));     ga . addParam ( 'sysparm_req_subcategory' ,            g_form . getValue ( 'fj_request_subcategory' ));      ga . getXMLAnswer ( function ( answer ) {           //alert('AJAX return:' + answer); ...