Resource Allocation

Important:

For information about the availability of the Resource Allocations feature, please contact your account representative.

The resource allocation record supports reserving an employee's time for a particular project.

The internal ID for this record is resourceallocation.

In the UI, you access this record by going to Activities > Scheduling > Resource Allocations. Alternatively, you can view the resource allocations for a specific project through the project record's Resources subtab (Lists > Relationships > Projects).

This record is available only if the Resource Allocations feature has been enabled at Setup > Company > Enable Features, on the Company tab. Note that this option will not be visible unless your account has been provisioned for this feature. For more details, contact your account representative.

For help working with this record in the user interface, see Resource Allocations.

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following:

Supported Script Types

This record is scriptable in both client SuiteScript and server SuiteScript

All three user events are supported: beforeLoad, beforeSubmit, and afterSubmit.

Supported Functions

The resource allocation record is fully scriptable — it can be created, updated, copied, deleted, and searched using SuiteScript.

Field Definitions

To create a new resource allocation record, you must reference two existing NetSuite records, as follows:

You are also required to provide values for several other fields. Refer to the SuiteScript Records Browser for the internal IDs of all fields associated with this record.

Note also that numberhours and percentoffime are read-only fields. They are returned when you load the record, but they cannot be modified.

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser.

Code Samples

The following example shows how to create a resource allocation record:

          var AMOUNT = "10.0";
var PROJECT1 = "43";     
var RESOURCE1 = "45";   
var ALLOCATIONTYPE1 = "1";   // Hard 
var ALLOCATIONTYPE2 = "2";   // Soft
var ALLOCATIONUNIT1 = "H";   // Hours
var ALLOCATIONUNIT2 = "P";   // Percent of Time
var NOTES1 = "My notes 1";
var STARTDATE1 = "4/20/2013";
var ENDDATE1 = "4/28/2013";
 
var newRecord = record.create ({
    type: 'resourceallocation'
});

newRecord.setValue ({
    fieldId: 'allocationamount',
    value: AMOUNT
});
newRecord.setValue ({
    fieldId: 'allocationresource',
    value: RESOURCE1
});
newRecord.setValue ({
    fieldId: 'allocationtype',
    value: ALLOCATIONTYPE1
});
newRecord.setValue ({
    fieldId: 'allocationunit',
    value: ALLOCATIONUNIT1
});
newRecord.setValue ({
    fieldId: 'startdate',
    value: STARTDATE1
});
newRecord.setValue ({
    fieldId: 'notes',
    value: NOTES1
});
newRecord.setValue ({
    fieldId: 'project',
    value: PROJECT1
});
newRecord.setValue ({
    fieldId: 'enddate',
    value: ENDDATE1
});
var recId = newRecord.save(); 

        

Related Topics

General Notices