diff --git a/src/guides/v2.3/ext-best-practices/tutorials/copy-fieldsets.md b/src/guides/v2.3/ext-best-practices/tutorials/copy-fieldsets.md index 1254a188afe..fe843e78823 100644 --- a/src/guides/v2.3/ext-best-practices/tutorials/copy-fieldsets.md +++ b/src/guides/v2.3/ext-best-practices/tutorials/copy-fieldsets.md @@ -36,6 +36,8 @@ The code snippet in the next step uses the name of the fieldset and aspect to sp **etc/fieldset.xml:** +The following example shows how to copy `sales_convert_quote`.`demo` to `sales_order`.`demo`. + ```xml @@ -49,6 +51,42 @@ The code snippet in the next step uses the name of the fieldset and aspect to sp ``` +Use the `targetField` attribute to specify the destination field. The following example shows how to copy `sales_convert_quote`.`demo` to `sales_order`.`order_demo`. + +```xml + + +
+ + + +
+
+
+``` + +Define a new `aspect` if you need to copy a field of a source table into multiple fields in a destination table. + +The following example shows how to copy `sales_convert_quote`.`demo` into + +- `sales_order`.`demo` +- `sales_order`.`order_demo` + +```xml + + +
+ + + + +
+
+
+``` + ## Step 3: Copy the fieldset {#step-3} For copying the fieldset, we'll observe the `sales_model_service_quote_submit_before` event by using the following code in our `etc/events.xml`: @@ -108,7 +146,6 @@ class SaveOrderBeforeSalesModelQuoteObserver implements ObserverInterface return $this; } } - ``` In the code, an instance of the `Copy` class is obtained from the constructor using [dependency injection][2].