<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: SAP Business One SDK - LoadFromDataSource(), FlushToD... in Enterprise Resource Planning Q&amp;A</title>
    <link>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14049777#M4211145</link>
    <description>Thank you!</description>
    <pubDate>Wed, 19 Mar 2025 13:14:59 GMT</pubDate>
    <dc:creator>Peach14</dc:creator>
    <dc:date>2025-03-19T13:14:59Z</dc:date>
    <item>
      <title>SAP Business One SDK - LoadFromDataSource(), FlushToDataSource(), how to store data back to UDT?</title>
      <link>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaq-p/14049289</link>
      <description>&lt;P&gt;I've created my own User-defined table and use it in my editable matrix sending data back and forth to&amp;nbsp;DBDataSource with&amp;nbsp;LoadFromDataSource() and&amp;nbsp;FlushToDataSource()&lt;/P&gt;&lt;P&gt;The question is, to store data, including insert, update and delete, back to UDT, do I need to manually loop over rows in the matrix, then run .Update(), .Add() or .Remove() myself or is there a way to manage it automatically?&lt;/P&gt;&lt;P&gt;I'm stuck at FlushToDataSource() after clicked on a Update button and ChatGPT taught me to manually set the data back, but I don't think it's an efficient way and tried to find other ways in UI and DI manual but not found anything.&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;if (pVal.ItemUID == "1" &amp;amp;&amp;amp; pVal.FormMode == (int)SAPbouiCOM.BoFormMode.fm_UPDATE_MODE &amp;amp;&amp;amp; pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED &amp;amp;&amp;amp; pVal.BeforeAction == true)
{
    SAPbouiCOM.Form oForm = oApp.Forms.Item(pVal.FormUID);
    SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("matrix").Specific;
                        
    oMatrix.FlushToDataSource();

    SAPbouiCOM.DBDataSource oDBDataSource = oForm.DataSources.DBDataSources.Item("@myUDT");
                        
    ...here is where I'm stuck.

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 08:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaq-p/14049289</guid>
      <dc:creator>Peach14</dc:creator>
      <dc:date>2025-03-19T08:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Business One SDK - LoadFromDataSource(), FlushToD...</title>
      <link>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14049543#M4211121</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A class="" href="https://community.sap.com/t5/user/viewprofilepage/user-id/1774265" target="_self"&gt;&lt;SPAN class=""&gt;Peach14&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can register the User Defined Object (UDO) for your user form.&lt;/P&gt;&lt;P&gt;After that system automatically handles Add, Update, Remove operations.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Kind regards,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ANKIT CHAUHAN&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;SAP Business One Support&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 10:31:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14049543#M4211121</guid>
      <dc:creator>ANKIT_CHAUHAN</dc:creator>
      <dc:date>2025-03-19T10:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Business One SDK - LoadFromDataSource(), FlushToD...</title>
      <link>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14049777#M4211145</link>
      <description>Thank you!</description>
      <pubDate>Wed, 19 Mar 2025 13:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14049777#M4211145</guid>
      <dc:creator>Peach14</dc:creator>
      <dc:date>2025-03-19T13:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Business One SDK - LoadFromDataSource(), FlushToD...</title>
      <link>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14050842#M4211221</link>
      <description>Can I bind this to my own custom form? Or I need to use system created UDO form.</description>
      <pubDate>Thu, 20 Mar 2025 02:32:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/enterprise-resource-planning-q-a/sap-business-one-sdk-loadfromdatasource-flushtodatasource-how-to-store-data/qaa-p/14050842#M4211221</guid>
      <dc:creator>Peach14</dc:creator>
      <dc:date>2025-03-20T02:32:59Z</dc:date>
    </item>
  </channel>
</rss>

