Lookupfield is deleted automatically by studio

I add below lookupfield into UI xml file but it is always deleted automatically after save.

<lookupField datasource="ccsWoDs" property="wo" optionsDatasource="ccLbmastsDs"/>

<fieldGroup id="fieldGroup"
                        datasource="ccsWoDs">
                <column width="250px">
                    <field property="wodate"/>
                    <field property="dpment"/>
                    <field property="shf"/>
                    <field property="begintime"/>
                    <field property="endtime"/>
                    <field property="hrs"/>
                    <field property="item"/>
                    <field property="mach"/>
                    <field property="stdp"/>
                    <field property="staff"/>
                    <field property="nonccs"/>
                    <field property="locn"/>
                </column>
                <column width="250px">
                    <lookupField datasource="ccsWoDs" property="wo" optionsDatasource="ccLbmastsDs"/>
                    <field property="leftqty"/>
                    <field property="qaqty"/>
                    <field property="qauom"/>
                    <field property="totcart"/>
                    <field property="totpcs"/>
                    <field property="phycart"/>
                    <field property="stkctqty"/>
                    <field property="qayn"/>
                    <field property="stkyn"/>
                    <field property="jdeyn"/>
                </column>
            </fieldGroup>

Hi,

The fieldGroup element can only contain fields and columns elements so that you can’t place a lookupField within it the way you do it now.

You have two options to add a LookupField to a FieldGroup:

  1. If a field is assigned to an entity attribute, then you can simply define the optionsDatasource attribute, so that the PickerField components will be replaced with the LookupPickerField without any actions. This means that it will look like the LookupField component.

  2. You can define a completely custom representation of a field. In order to do that:

    1. Remove the property attribute
    2. Define the id attribute
    3. Within the field element place the needed component
<fieldGroup>
    <field id="demo">
        <lookupField id="demoField" datasource="userDs" property="group"/>
    </field>
</fieldGroup>

You can find more information in the documentation.

Regards,
Gleb