JavaScript method: SCFile.getBinary()

This JavaScript method returns the binary representation of a field in a Service Manager file object.

Syntax

SCFile_object.getBinary (fieldName);

Arguments

The following argument is valid for this method:

Argument Data type Description
fieldName String This argument specifies the name of a field from which you want to extract the binary data.

Return values

The method returns a JS object that contains the binary data of the field.

Example

var bb = new SCFile("bbtosysattachments");
var rc = bb.doSelect("true");
var attachmentObj= new Attachment();
attachmentObj.value = bb.getBinary("att_attachment")
attachmentObj.name = bb.att_filename;
attachmentObj.type = "excel";