Poq.SDK.Node

Home > @poq/sdk-sfcc > BaseModel > setPropertyValue

BaseModel.setPropertyValue() method

Method helps to set custom properties of object since they are not defined in schema.

Signature:

setPropertyValue<T>(propertyName: string, value: unknown): void;

Parameters

Parameter Type Description
propertyName string Property name.
value unknown Value of the property.

Returns:

void

Value of the property.

Example

// For OCAPI models custom properties should go with `c_` prefix.
// Code set property that is not defined in original model.
instance.setPropertyValue('c_someCustomProperty', value);