Skip to main content

Hi, 

 

On 15.3.4

 

Is there an API available to add a line in Trans log? For use in Process Flows

 

I use the following API, i created new  bpart_id, the bpart_id exists.

But this API is not working.

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="Service_Order">
      <action name="data-update">
        <main>
          <row number="1">
            <order_id dtype="string" in_var="" out_var="">SV2206010022@@1</order_id>
          </row>
        </main>
        <trans_log>
          <row>
            <bpart_id in_var="" out_var="">sla_revision_change</bpart_id>
            <qty in_var="" out_var="">1</qty>
            <is_fullfiled in_var="" out_var="">Y</is_fullfiled>
            <actual_dt in_var="" out_var="">2022-09-12</actual_dt>
            <actual_tm in_var="" out_var="">12:07:08</actual_tm>
            <bpart_gcl_id in_var="" out_var="">Mngt</bpart_gcl_id>
            <comment_text in_var="" out_var="">TEST:</comment_text>
          </row>
        </trans_log>
      </action>
    </state>
  </session>
</root>

 

Hi Robin,

 

Please try demand_management (not trans_log)

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="Service_Order">
      <action name="data">
        <main>
          <row number="1">
            <order_id>SV2206010022@@1</order_id>
          </row>
        </main>
        <demand_management>
          <row>
            <bpart_id>Modified</bpart_id>
            <is_billable>N</is_billable>
            <comment_text>Test</comment_text>
          </row>
        </demand_management>
      </action>
    </state>
  </session>
</root>

 

Regards,

Joshua


Hi Joshua,

 

I know, i uses demand_management for other things and that is working, but the problem is that demand_management is writing data to demand table instead of order_changes_log table, so i asume to use trans_log element to write date to order_changes_log table.

 

The reason is that we have report and queries that already is looking in the order_changes_log table, so thats why i want to write data to the order_changes_log table through a Process Flow with an API Action.

 

Is there a way to this or this is just not possible to write data to order_changes_log table through a API

 

Regards,

Robin


Hi Robin,

 

In that case please use ‘order_changes_log’ as sample below.

Remove the qty, is_fullfiled, bpart_gcl_id

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="Service_Order">
      <action name="data-update">
        <main>
          <row number="1">
            <order_id dtype="string" in_var="" out_var="">SV2206010022@@1</order_id>
          </row>
        </main>
        <order_changes_log>
          <row>
            <bpart_id in_var="" out_var="">UpdateOrder</bpart_id>
            <created_by in_var="" out_var="">seal</created_by>
            <creation_datetime in_var="" out_var="">2022-09-12T15:30:45</creation_datetime>
            <actual_dt in_var="" out_var="">2022-09-12</actual_dt>
            <actual_tm in_var="" out_var="">12:07:08</actual_tm>
            <bpart_descr in_var="" out_var="">Test Description</bpart_descr>
            <comment_text in_var="" out_var="">TEST Comment</comment_text>
          </row>
        </order_changes_log>
      </action>
    </state>
  </session>
</root>


Thank you Joshua, that is it.


Hi Joshua,

 

How can i get the current datetime in a process flow to fill creation_datetime in order_changes_log

 

thanks..


Hi,

 

A other question about this topic, i try to use this api to do the same in Service order History

 

seems that c_order_changes_log not exist is this correct?

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="Service_Order_History">
      <action name="data-update">
        <main>
          <row number="1">
            <order_id dtype="string" in_var="" out_var="">SV2206010022@@1</order_id>
          </row>
        </main>
        <c_order_changes_log>
          <row>
            <bpart_id in_var="" out_var="">UpdateOrder</bpart_id>
            <created_by in_var="" out_var="">seal</created_by>
            <creation_datetime in_var="" out_var="">2022-09-12T15:30:45</creation_datetime>
            <actual_dt in_var="" out_var="">2022-09-12</actual_dt>
            <actual_tm in_var="" out_var="">12:07:08</actual_tm>
            <bpart_descr in_var="" out_var="">Test Description</bpart_descr>
            <comment_text in_var="" out_var="">TEST Comment</comment_text>
          </row>
        </c_order_changes_log>
      </action>
    </state>
  </session>
</root> 


Hi Robin,

 

Unfortunately there is no functionality to add c_order_changes_log from Service Order History via API.


Reply