Introduction

The WixDataPatch methods enable you to specify the modifications you want to apply to a data item. You can apply multiple modifications in a single patch operation.

Build a patch operation by calling the patch() method on the data item, and refine it by chaining WixDataPatch modification methods onto it. You can set or increment a field value, remove it altogether, or add to or remove items from an array field. The methods are applied in the order in which they are chained.

Finally, run the patch operation by calling run().

Notes:

For example, the following code patches a costume item by adding sizes, removing a color option, and marking it as available:

Copy
Did this help?