getCookies() API does not work in scoped application


When getCookies() API is called from a scope application, it fails.

Steps to Reproduce


  1. Create a RestMessageV2 or SOAPMessageV2 and execute it in a scoped application.

  2. On the response object, try to retrieve the cookies by calling the getCookies() function.

    The function will fail out of scope.

    For example, the following script will work on a global scope but it fails on an scoped application:

    function(e, d) {
      var a = new sn_ws.RESTMessageV2;
      a = a.execute().getCookies();;
      for (var c = [], b = 0; b < a.size(); b++) c.push(a.get(b));
    })(request, response);


Move the REST/SOAP operations to a global application.

Related Problem: PRB732515