Map/Reduce Script Objects as XML Definitions

A map/reduce script record and its deployments are represented in SuiteCloud Development Framework (SDF) by a mapreducescript SDF custom object. Map/reduce scripts are a server side script type in SuiteScript used for processing a large number of records or a large amount of data. For more information about using map/reduce scripts, see SuiteScript 2.x Map/Reduce Script Type in the SuiteScript documentation.

For information about working with a map/reduce script object from your SuiteCloud project, see the following topics:

Structure of a Map/Reduce Object

The map/reduce script object is comprised of script record elements, a reference to the map/reduce script file, and optionally includes script deployments, custom fields, and plug-in structures. The following example shows the structure of a map/reduce script object.

Note:

Map/reduce script IDs require the prefix ‘customscript’ followed by your unique ID. For more information about prefixes, see SDF Custom Object File Structure.

            <mapreducescript scriptid="customscript_mysuitescript">
    <isinactive>F</isinactive>
    <name>NAME</name>
    <notifyowner>T</notifyowner>
    <scriptfile>[/FolderPath/FileName.js]</scriptfile>
    <scriptdeployments>
        <scriptdeployment>
            ...
        </scriptdeployment>
    </scriptdeployments>
    <customplugintypes>
        <plugintype>
            ...
        </plugintype>
    </customplugintypes>
    ...
    <scriptcustomfield>
        <scriptcustomfield>
            ...
        </scriptcustomfield>
    </scriptcustomfields>
</mapreducescript> 

          

For information about the fields and values supported for this object, see the following topics:

Manifest Requirements

To deploy map/reduce script objects to an account, Server Side Scripting must be enabled. For more information, see Feature Dependencies for SDF Custom Objects in SuiteCloud Projects and Enabling SuiteCloud Development Framework in the Target NetSuite Account (Administrator Only).

Related Topics

General Notices