productionCharges.updateAllChargesToItemPurchasePrice(options)

Method Description

Updates cost on all routing and non-inventory transaction lines on a specified transaction to the current price.

Returns

void

Supported Script Types

Server scripts.

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

Governance

None

Module

N/manufacturing/productionCharges Module

Since

2026.1

Parameters

Parameter

Type

Required / Optional

Description

options.transactionId

number

required

ID of transaction to be updated.

Errors

Error Code

Message

Thrown If

INVALID_NUMBER_MUST_BE_GREATER_THAN_1

Invalid number (must be greater than 0)

The value of options.transactionId or options.transactionLineIds is not a positive integer.

FEATURE_1_MUST_BE_ENABLED_TO_USE_2_API

Feature 'Assembly Items' must be enabled to use 'N/manufacturing/productionCharges' API.

Assembly Items feature is not enabled.

PREFERENCE_1_REQUIRED_FOR_THIS_OPERATION

Preference Allow bulk cost updates for Production Charges required for this operation.

Allow bulk cost updates for Production Charges preference is not enabled.

ACCESS_DENIED

Access denied

The user does not have at least Edit permission for the following transactions:

  • if Manufacturing Work In Process feature is disabled: Build Assemblies

  • if Manufacturing Work In Process feature is enabled: Assembly Build, Work Order Completion and Work Order Issue

For more information, see Setting Permissions.

TRANSACTION_1_IS_INVALID_OR_HAS_NO_EDITABLE_TRANSACTION_LINES

Transaction with ID '{1: transaction ID}' is invalid or has no transaction lines that can be edited through this API

Transaction does not exist or does not meet the following criteria:

  • is of type Assembly Build, Work Order Completion or Work Order Issue

  • is in an open posting period

  • has at least one transaction line that is editable by this API

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/manufacturing/productionCharges Module Samples.

          //Add additional code 
...
require(["N/manufacturing/productionCharges"], function(productionCharges){
    productionCharges. updateChargesToItemPurchasePrice ({
        transactionId: 58,
        transactionLineIds: [9]
    });
});
...
//Add additional code 

        

Related Topics

General Notices