Modules
Objects/Functions
SuiteScript 2.0
{Node}.replaceChild({newChild: {xml.Node},oldChild: {xml.Node}})
N/xml Module
Node.replaceChild()
Method Description:
Replaces a specific child node with another child node in a list of child nodes.
If the new child node to add already exists in the list of child nodes, the node is first removed.
Returns:
xml.Node
Supported Script Types:
All script types
For more information, see SuiteScript 2.0 Script Types.
Governance:
None
Module:
N/xml Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=Node.replaceChild(options)
Example:
// Code Example 1
//Add additional code
//...
var replacednode = parentNode.replaceChild({
newChild : elem[2],
oldChild : elem[1]
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_456990295409.html