I am trying to add a Serial No reference to a checklist through either API or a custom import template. The import template I have tried to create just fails. I am getting close with the API, and can insert an Activity Reference, but when specifying a serial, nothing happens.
<root
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<session email="" alias="">
<state bc_name="Checklist">
<action name="declare">
<attribute dtype="string" in_var="" out_var="" name="CheckListID" value="" />
</action>
<action name="getdescrtableex">
<attribute in_var="" out_var="CheckListID" table_name="checklist" element_name="cl_id" search_criteria="cl_name= 'RNZ Rego Reminder'" default_value="" />
</action>
<action name="data">
<main>
<row number="1">
<cl_id dtype="int" in_var="CheckListID" out_var="">
<!CDATA 25]]>
</cl_id>
</row>
</main>
<checklist_reference>
<row number="1">
<activity_id in_var="" out_var="">
<!CDATAFT_ASSIST]]>
</activity_id>
<cc_serial_no in_var="" out_var="">
<!"CDATAvX615F950003]]>
</cc_serial_no>
<bo_search_keys>
<item>
<name>activity_id</name>
<value>
<!CDATAFT_ASSIST]]>
</value>
</item>
</bo_search_keys>
</row>
</checklist_reference>
</action>
</state>
</session>
</root>
Hi Chris,
Please use the item_id instead of cc_serial_no.
Below is the API sample. Good luck.
<root
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<session email="" alias="">
<state bc_name="Checklist">
<action name="declare">
<attribute dtype="long" in_var="" out_var="" name="CheckListID" value="" />
<attribute dtype="long" in_var="" out_var="" name="ItemID" value="" />
</action>
<action name="getdescrtableex">
<attribute in_var="" out_var="CheckListID" table_name="checklist" element_name="cl_id" search_criteria="cl_name= 'Minimum Call Procedure for PRO series'" default_value="" />
</action>
<action name="getdescrtableex">
<attribute in_var="" out_var="ItemID" table_name="item" element_name="item_id" search_criteria="serial_no= 'X615F950003'" default_value="" />
</action>
<action name="data">
<main>
<row number="1">
<cl_id dtype="int" in_var="CheckListID">in_var</cl_id>
</row>
</main>
<checklist_reference>
<row number="1">
<activity_id in_var="" out_var="">
<! CDATAFT_ASSIST]]>
</activity_id>
<item_id in_var="ItemID">in_var</item_id>
<bo_search_keys>
<item>
<name>activity_id</name>
<value>
<!DCDATAiFT_ASSIST]]>
</value>
</item>
<item>
<name>item_id</name>
<value in_var="ItemID">in_var</value>
</item>
</bo_search_keys>
</row>
</checklist_reference>
</action>
</state>
</session>
</root>
Thank you Joshua. That's incredibly helpful.
If I want to remove a reference entry by item id, do I just do a delete action instead of data?
I think I figured delete out. Just add delete = “true” to the row.
Hi Chris,
For delete you need to specify it in API as sample below
<checklist_reference>
<row delete="true">
<item_id>2782982</item_id>
<bo_search_keys>
<item>
<name>item_id</name>
<value>2782982</value>
</item>
</bo_search_keys>
</row>
</checklist_reference>
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.