Home > @poq/sdk-sfcc > BaseModel > setPropertyValue
Method helps to set custom properties of object since they are not defined in schema.
Signature:
setPropertyValue<T extends {
[K in keyof T]: T[K];
}, K extends keyof T>(propertyName: K, value: T[K]): void;
Parameter | Type | Description |
---|---|---|
propertyName | K | Property name. |
value | T[K] | Value of the property. |
Returns:
void
Value of the property.
// Code set property that is efined in original model.
instance.setPropertyValue('definedProperty', value);