updates - NetSuite API - How to send tracking number back to Invoice or Sales Order? -


i'm integrating shipping solution netsuite via soap api. can retrieve shipaddress via searchrecord call. need send tracking number, service used, , cost netsuite. hoping can point me in right direction searching hasn't turned answers me. example xml great.

im pretty pasting had external developer attempt implement response don't understand how setup envelope receive within ns on record...i think handling update post field:

'              var = new array();                                  a['content-type'] = 'text/xml; charset=utf-8';                                  a['post'] = '/fedexnsservice/service1.asmx http/1.1';                                  a['content-length'] = data.length;                                             a['soapaction'] = 'https://wsbeta.fedex.com:443/web-services/ship/returnfedexlable';                                 nlapilogexecution('debug', 'results', 'data : ' + data);                var response = nlapirequesturl('http://sonatauat.adaaitsolutions.com/fedexnsservice/service1.asmx?op=returnfedexlable', data, a, null,null); nlapilogexecution('debug', 'response', response);                             var responsexml = nlapistringtoxml(response.getbody()); nlapilogexecution('debug', 'responsexml', responsexml);                                  var responsecode = response.getcode(); nlapilogexecution('debug', 'responsecode', responsecode);                                  var body = response.getbody(); nlapilogexecution('debug', 'body', body);                                                                  nlapilogexecution('debug', 'responsexml '+responsexml, 'responsecode : ' + responsecode);                                  nlapilogexecution('debug', 'body ', 'body : ' +body);                         var imageurl ='';                             if(responsexml != null)                     {                              var rawfeeds = nlapiselectnodes(responsexml, "//tracking");                              var fileinternalid = nlapiselectvalue(rawfeeds[0], "fileinternalid");                             var trackingids = nlapiselectvalue(rawfeeds[1], "trackingids");                             nlapilogexecution('debug', 'fileinternalid '+fileinternalid, 'trackingids : '+trackingids );                                 if(fileinternalid)                             {                                 var image=nlapiloadfile(5985);                                 imageurl=image.geturl();                                 imageurl = ("https://system.netsuite.com"+imageurl);                                        nlapilogexecution('debug','image',imageurl);                             }                      }             return imageurl; ' 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -