Class: nlobjResponse

nlobjResponse

new nlobjResponse() → {nlobjResponse}

Return a new instance of nlobjResponse used for scripting web responses in Suitelets
Source:
Returns:
Type
nlobjResponse

Methods

addHeader(name, value) → {void}

add a value for a response header.
Parameters:
Name Type Description
name string of header
value string for header
Since:
  • 2008.2
Source:
Returns:
Type
void

getAllHeaders() → {Object}

return an Array of all response headers
Since:
  • 2008.2
Source:
Returns:
Type
Object

getHeader(name) → {string}

return the value of a response header.
Parameters:
Name Type Description
name string of header
Since:
  • 2008.2
Source:
Returns:
Type
string

getHeaders(name) → {string[]}

return an Array of all response header values for a header
Parameters:
Name Type Description
name string of header
Since:
  • 2008.2
Source:
Returns:
Type
string[]

sendNoCache() → {void}

suppress caching for this response.
Since:
  • 2009.1
Source:
Returns:
Type
void

sendRedirect(type, subtype, id, pagemode, parameters) → {void}

sets the redirect URL for the response. all URLs must be internal unless the Suitelet is being executed in an "Available without Login" context at which point it can use type "external" to specify an external url via the subtype arg
Parameters:
Name Type Argument Description
type string type specifier for URL: suitelet|tasklink|record|mediaitem|external
subtype string subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid|url
id string <optional>
internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a
pagemode string <optional>
string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view)
parameters Object <optional>
Object used to specify additional URL parameters as name/value pairs
Since:
  • 2008.2
Source:
Returns:
Type
void

setContentType(type, filename, disposition) → {void}

sets the content type for the response (and an optional filename for binary output).
Parameters:
Name Type Description
type string the file type i.e. plainText, word, pdf, htmldoc (see list of media item types)
filename string the file name
disposition string Content Disposition used for streaming attachments: inline|attachment
Since:
  • 2008.2
Source:
Returns:
Type
void

setHeader(name, value) → {void}

set the value of a response header.
Parameters:
Name Type Description
name string of header
value string for header
Since:
  • 2008.2
Source:
Returns:
Type
void

write(output) → {void}

write information (text/xml/html) to the response.
Parameters:
Name Type Description
output string
Since:
  • 2008.2
Source:
Returns:
Type
void

writeLine(output) → {void}

write line information (text/xml/html) to the response.
Parameters:
Name Type Description
output string
Since:
  • 2008.2
Source:
Returns:
Type
void

writePage(pageobject) → {void}

write a UI object page.
Parameters:
Name Type Description
pageobject Object page UI object: nlobjList|nlobjAssistant|nlobjForm|nlobjDashboard
Since:
  • 2008.2
Source:
Returns:
Type
void