Skip to main content

Posts

Showing posts from September, 2024

ServiceNow Submit a Request Using Cart API - 2 Approaches

ServiceNow Submit a Request Using Cart API - 2 Approaches 1) cart_api object 2) using table api -- var instName = gs.getProperty( 'instance_name' ); if (instName == 'xxdev' || instName == 'xxdev2' ) {     submitRequest(); //--CART API     //submitRequest_tableapi(instName); //--TABLE API - useful to target a remote instance }   function submitRequest() {     var sRequestedFor = gs.getUserID();     var sApplicationName = 'test_app' ;     var sEnvironment = 'DEV' ;     var sMetaData = '' ;     var sOwnerEmails = 'test@test.com' ;     var sTenantID = xxxxx-4718-4590-a921-xxxxxxxxx ;     var sReplyURL = 'www.test123.com' ;     var sManager = 'bfdb471e1b3931500b2c2f876e4xxxxx' ;       var sAppDescription = 'test-1234' ;     var sURL_1 = 'www.test456.com'       var cart = new sn_sc. CartJS ();     var item = {         'sysparm_id' : 'f