0

i have created a custom field in product edit inventory its value was saved in database every time but not showing in admin edit here is my code

<fieldset name="stock_data">
                  <container name="container_is_discontinued" component="Magento_Ui/js/form/components/group" sortOrder="1200">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="formElement" xsi:type="string">container</item>
                        <item name="label" xsi:type="string" translate="true">Is Discontinued</item>
                        <item name="dataScope" xsi:type="string">quantity_and_stock_status</item>
                        <item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
                        <item name="imports" xsi:type="array">
                            <item name="visible" xsi:type="string">${$.provider}:data.product.stock_data.manage_stock</item>
                        </item>
                    </item>
                </argument>
                <field name="is_discontinued" formElement="select">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="value" xsi:type="number">0</item>
                        </item>
                    </argument>
                    <settings>
                        <scopeLabel>[GLOBAL]</scopeLabel>
                        <label translate="true">Is Discontinued</label>
                        <dataScope>is_discontinued</dataScope>
                    </settings>
                    <formElements>
                        <select>
                            <settings>
                                <options class="Magento\Config\Model\Config\Source\Yesno"/>
                            </settings>
                        </select>
                    </formElements>
                </field>
            </container>
        </fieldset>

it not showing the saved value

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.