Skip to main content
Skip to main content

update - Stock Location Next Module Reference

This documentation provides a reference to the update method. This belongs to the Stock Location Next Module.

update(id, input, context?): Promise<StockLocationDTO>

This method updates existing stock locations.

Example

const stockLocations =
await stockLocationModuleService.update([
{
id: "sloc_123",
name: "Warehouse",
},
{
id: "sloc_321",
address_id: "laddr_123",
},
])

Parameters

idstringRequired
The attributes to update in the stock locations.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StockLocationDTO>Required
The updated stock locations.

update(selector, input, context?): Promise<StockLocationDTO[]>

This method updates existing stock locations matching the specified filters.

Example

const stockLocations =
await stockLocationModuleService.update(
{
name: "Warehouse",
},
{
address_id: "laddr_123",
}
)

Parameters

The filters specifying which stock locations to update.
The attributes to update in the stock locations.
contextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<StockLocationDTO[]>Required
The updated stock locations.
Was this section helpful?