Document.getElementById(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Returns the element that has an ID attribute with the specified value as an xml.Element object. Returns null if no such element exists.

Returns

xml.Element

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/xml Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.elementId

string

required

Unique ID value for an element.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/xml Module Script Samples.

          //Add additional code 
...
var elem = xmlDocument.getElementById({
    elementId : 'id12345'
});
...
//Add additional code 

        

Related Topics

xml.Document
N/xml Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices