431 views

Description

When sending a REST message asynchronously using the RESTMessageV2 API executeAsync function, calling the saveResponseBodyAsAttachment method without an encryption context parameter causes the REST message to fail.

Steps to Reproduce

 

Run the following script using values from your instance.

var r = new sn_ws.RESTMessageV2('msg','fnName');
r.saveResponseBodyAsAttachment('<tableName>','<sys_id>','<file_name>');
var response = r.executeAsync();

Workaround

Call saveResponseAsAttachment with four parameters. You can pass an empty string as the fourth parameter.

For example, the following script fails because only three parameters are passed:

var r = new sn_ws.RESTMessageV2('msg','fnName');
r.saveResponseBodyAsAttachment('<tableName>','<sys_id>','<file_name>');
var response = r.executeAsync();

Change the script as follows:

var r = new sn_ws.RESTMessageV2('msg','fnName');
r.saveResponseBodyAsAttachment('<tableName>','<sys_id>','<file_name>',''); // pass empty string as fourth param
var response = r.executeAsync();


Related Problem: PRB668694

Seen In

Helsinki Patch 0 Hot Fix 1

Fixed In

Istanbul

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-08-25 16:42:37
Published:2017-08-21