Skip to main content

Hi,

 

The situation is that we have a bulk of service orders (1500) where we want to add a new checklist.

The checklist has multi entries id.

 

I try it trought a API with multi entry rows but only the 1e row in added as the checklist.

Also if i run the API per row, also the first row is added.

 

Is there way to add checklist with mulit entries to mulit orders? Version 15.1

<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="">SV2201190213@@4</order_id>
</row>
</main>
<checklist_for_order>
<row number="1">
<checklist_cl_id in_var="" out_var="">660</checklist_cl_id>
<checklist_entry_cl_id in_var="" out_var="">660</checklist_entry_cl_id>
<checklist_entry_entry_id in_var="" out_var="">1605</checklist_entry_entry_id>
<cl_id dtype="int" in_var="" out_var="">660</cl_id>
<entry_id dtype="int" in_var="" out_var="">1605</entry_id>
<sequence in_var="" out_var="">1</sequence>
<table_key in_var="" out_var="">48601380</table_key>
<table_name in_var="" out_var="">labor</table_name>
<seq_in_execution in_var="" out_var="">1</seq_in_execution>
<is_from_repeat_section in_var="" out_var="">N</is_from_repeat_section>
</row>
<row number="2">
<checklist_cl_id in_var="" out_var="">660</checklist_cl_id>
<checklist_entry_cl_id in_var="" out_var="">660</checklist_entry_cl_id>
<checklist_entry_entry_id in_var="" out_var="">1606</checklist_entry_entry_id>
<cl_id dtype="int" in_var="" out_var="">660</cl_id>
<entry_id dtype="int" in_var="" out_var="">1606</entry_id>
<sequence in_var="" out_var="">2</sequence>
<table_key in_var="" out_var="">48601380</table_key>
<table_name in_var="" out_var="">labor</table_name>
<seq_in_execution in_var="" out_var="">2</seq_in_execution>
<is_from_repeat_section in_var="" out_var="">N</is_from_repeat_section>
</row>
</checklist_for_order>
</action>
</state>
</session>
</root>

 

Hi Robin,

 

Below is the sample to create a new checklist for Service Order Header with the checklist id (cl_id = 660)

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="Service_Order">
      <action name="execmacro">
        <attribute bo_name="main" macro_name="retrieve" />
        <attribute dtype="string" value="SV2204190001@@1" />
      </action>
      <action name="execmacro">
        <attribute bo_name="checklist_for_order_hdr" macro_name="GETCHECKLISTLINESNEW" />
        <attribute dtype="string" value="660" />
        <attribute dtype="string" value="order" />
        <attribute dtype="string" value="SV2204190001@@1" />
      </action>
      <action name="execmacro">
        <attribute bo_name="main" macro_name="save" />
      </action>
    </state>
  </session>
</root>

 

Good luck

 

Regards,

Joshua


Similar API for demand labor with demand id = 20303962

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="Service_Order">
      <action name="execmacro">
        <attribute bo_name="main" macro_name="retrieve" />
        <attribute dtype="string" value="SV2204190001@@1" />
      </action>
      <action name="execmacro">
        <attribute bo_name="checklist_for_order_hdr" macro_name="GETCHECKLISTLINESNEW" />
        <attribute dtype="string" value="660" />
        <attribute dtype="string" value="labor" />
        <attribute dtype="string" value="20303962" />
      </action>
      <action name="execmacro">
        <attribute bo_name="main" macro_name="save" />
      </action>
    </state>
  </session>
</root>

 

 


Hi Joshua, 

 

Thanks, this is what i was looking for.

 

Robin,


Reply