I am trying to create a single form that creates a product and also adds a SKU but I have not found an example that helps me out so far.
What I am trying to build is a form-single with three text-line/area fields for the values to be input by the user, while I am able to save values for the productName and the description correctly the idValue unsurprisingly does not save. I have tried including the full entity path in the field name but this also does not work.
Any suggestions or pointers to existing examples would be gratefully received!
<?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-1.5.xsd">
<parameter name="productId"/>
<transition name="newProduct">
<default-response url=".">
<parameter name="productId" value=""/>
</default-response>
</transition>
<transition name="createProduct">
<service-call name="create#mantle.product.Product"/>
<default-response url="."/>
</transition>
<transition name="updateProduct">
<service-call name="update#mantle.product.Product"/>
<default-response url="."/>
</transition>
<widgets>
<form-single name="CreateProduct" transition="createProduct">
<field name="productName"><default-field><text-line/></default-field></field>
<field name="description"><default-field><text-area/></default-field></field>
<field name="idValue"><default-field><text-line></text-line></default-field></field>
<field name="submitButton"><default-field title="Create"><submit/></default-field></field>
</form-single>
</widgets>
</screen>