Skip to Content
avatar image
Former Member

Load Form from XML - unable to edit Matrix when Form is in ADD mode.

Hello,

i created an UDO with Document + Document Lines. So far so good. When i open it via the Menu in SBO Data Browser works and i can add several lines to the document. Also, when i rightclick on the matrix i have two menu entries to add and delete a line.

But since i wanted to add some Buttons and a CFL, tried to edit the form in Business One Studio and use the LoadBatchActions.

So i load the UDO Form directly from the DB in SAP Business One Studio.

But then, when i try to preview the form in SBO (without doing ANY change to it, i just load it from DB and preview it again) the behavior is completely different.

When i change to ADD Mode, I can only edit the head data, but not the line data. When i do a right-click on the matrix, i dont have the menu entry to add a new line.

When i enter the head data, add the object and open it again (data browser is working fine), then i am able to add some lines.

Of course this behavior is the same when i save the form to XML and load it with LoadBatchActions.

I am aware the Business One Studio changes some default settings like the form mode (add / search / cancel,...) and also the default button... But i have no idea what it's doing to the matrix / rows...

attached you find the source of my XML Form, maybe you have an idea for me :)

<?xml version="1.0" encoding="UTF-16"?>
<Application>
  <forms>
    <action type="add">
      <form appformnumber="UDO_FT_Absatzplan20" FormType="UDO_FT_Absatzplan20" type="0" BorderStyle="0" uid="UDO_F_Absatzplan20" title="Absatzplan20" visible="1" default_button="" pane="1" color="0" left="370" top="127" width="600" height="372" client_width="492" client_height="299" AutoManaged="1" SupportedModes="15" ObjectType="Absatzplan20" mode="3">
        <datasources>
          <DataTables />
          <dbdatasources>
            <action type="add">
              <datasource tablename="@FAV_ABPLAN20_KOPF" />
              <datasource tablename="@FAV_ABPLAN20_ZEILEN" />
            </action>
          </dbdatasources>
          <userdatasources>
            <action type="add">
              <datasource uid="FolderDS" type="9" size="1" />
            </action>
          </userdatasources>
        </datasources>
        <Menus />
        <items>
          <action type="add">
            <item uid="U_RC" type="100" left="5" tab_order="0" width="570" top="92" height="207" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
              <AutoManagedAttribute />
              <specific />
            </item>
            <item uid="0_U_FD" type="99" left="5" tab_order="" width="100" top="73" height="20" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific caption="Absatzplan20Zeil" AffectsFormMode="1" val_on="Y" val_off="N" pane="1" AutoPaneSelection="1">
                <databind databound="1" table="" alias="FolderDS" />
              </specific>
            </item>
            <item uid="0_U_S" type="8" left="6" tab_order="0" width="121" top="6" height="14" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" description="DocEntry                      " linkto="0_U_E" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific caption="DocEntry                      " />
            </item>
            <item uid="0_U_E" type="16" left="127" tab_order="0" width="148" top="6" height="14" visible="1" enabled="0" from_pane="0" to_pane="0" disp_desc="" right_just="0" description="DocEntry                      " linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific TabOrder="6">
                <databind databound="1" table="@FAV_ABPLAN20_KOPF" alias="DocEntry" />
              </specific>
            </item>
            <item uid="21_U_S" type="8" left="306" tab_order="0" width="121" top="6" height="14" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" description="Jahr                          " linkto="21_U_E" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific caption="Jahr                          " />
            </item>
            <item uid="21_U_E" type="16" left="427" tab_order="0" width="148" top="6" height="14" visible="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" description="Jahr                          " linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific TabOrder="7">
                <databind databound="1" table="@FAV_ABPLAN20_KOPF" alias="U_Jahr" />
              </specific>
            </item>
            <item uid="20_U_S" type="8" left="6" tab_order="0" width="121" top="21" height="14" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" description="VertriebsMA                   " linkto="20_U_E" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific caption="VertriebsMA                   " />
            </item>
            <item uid="20_U_E" type="16" left="127" tab_order="0" width="148" top="21" height="14" visible="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" description="VertriebsMA                   " linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific TabOrder="8">
                <databind databound="1" table="@FAV_ABPLAN20_KOPF" alias="U_VertriebsMA" />
              </specific>
            </item>
            <item uid="1" type="4" left="6" tab_order="" width="65" top="312" height="19" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific caption="OK" />
            </item>
            <item uid="2" type="4" left="76" tab_order="" width="65" top="312" height="19" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="" right_just="0" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific caption="Abbrechen" />
            </item>
            <item uid="0_U_G" type="127" left="15" tab_order="" width="555" top="113" height="163" visible="1" enabled="1" from_pane="1" to_pane="1" disp_desc="" right_just="0" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1" IsAutoGenerated="1">
              <specific SelectionMode="2">
                <columns>
                  <action type="add">
                    <column uid="#" type="16" title="#" description="#" visible="1" AffectsFormMode="1" width="20" disp_desc="0" editable="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1" />
                    <column uid="C_0_1" type="16" title="Planungsgruppe Nr." description="Planungsgruppe Nr." visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_PG_NR" />
                    </column>
                    <column uid="C_0_2" type="16" title="Planungsgruppe" description="Planungsgruppe" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_PG_BEZ" />
                    </column>
                    <column uid="C_0_3" type="16" title="Umsatz VVJ" description="Umsatz VVJ" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_UMS_VVJ" />
                    </column>
                    <column uid="C_0_4" type="16" title="Umsatz VJ" description="Umsatz VJ" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_UMS_VJ" />
                    </column>
                    <column uid="C_0_5" type="16" title="Umsatz IST 01-10" description="Umsatz IST 01-10" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_UMS_IST" />
                    </column>
                    <column uid="C_0_6" type="16" title="Plan 11-12" description="Plan 11-12" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_PLAN_11_12" />
                    </column>
                    <column uid="C_0_7" type="16" title="Forecast 11-12" description="Forecast 11-12" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_FC_11_12" />
                    </column>
                    <column uid="C_0_8" type="16" title="Plan Jahr" description="Plan Jahr" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_PLAN_JAHR" />
                    </column>
                    <column uid="C_0_9" type="16" title="Forecast Jahr" description="Forecast Jahr" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_FC_JAHR" />
                    </column>
                    <column uid="C_0_10" type="16" title="Plan Folgejahr" description="Plan Folgejahr" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_PLAN" />
                    </column>
                    <column uid="C_0_11" type="16" title="DB IST %" description="DB IST %" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_DB_IST" />
                    </column>
                    <column uid="C_0_12" type="16" title="DB PLAN %" description="DB PLAN %" visible="1" AffectsFormMode="1" width="100" disp_desc="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" IsAutoGenerated="1">
                      <databind databound="1" table="@FAV_ABPLAN20_ZEILEN" alias="U_DB_PLAN" />
                    </column>
                  </action>
                </columns>
              </specific>
            </item>
          </action>
        </items>
        <ChooseFromListCollection>
          <action type="add">
            <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1" />
          </action>
        </ChooseFromListCollection>
        <DataBrowser BrowseBy="0_U_E" />
        <Settings Enabled="1" EnableRowFormat="1" />
        <items>
          <action type="group">
            <item uid="0_U_FD" />
          </action>
        </items>
      </form>
    </action>
  </forms>
</Application>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 02, 2016 at 03:12 PM

    Hi Harald,

    Previewing of the form from B1 Studio won't run code attached to it. When using LoadBatchAction during your addon execution will.

    The navigation will work since you have an UDO attached to the form.

    Those this answer your question or am I way off?

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded