Hi Anthony,
You can update multiple material lines with a process flow.
You just can't get the ETA date from an activity in this case.
To update multiple lines select as condition Material in the process flow.
In the mapping to API in the excecute action you can only select fields at order level or from material line and not from an activity, since there can be multiple activities on an order.
Make sure that in your API, you set the followed, in the state element to update multiple lines.
<state bc_name="Service_Order" is_allow_save_changed="true" is_retry_on_optimistic_error="true">
This prevents bu_ProcessFlow user from being locked when updating multi lines in loop in same order.
Because material is selected as a condition, when an event occurs all material lines on that order will be updated in a loop.
Example of an API for updating a material line. (This excecute action is called for each material line.)
<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
<session email="" alias="">
<state bc_name="Service_Order" is_allow_save_changed="true" is_retry_on_optimistic_error="true">
<action name="data">
<main>
<row number="1">
<order_id dtype="string" in_var="" out_var="">{order_id}</order_id>
</row>
</main>
<demand_material>
<row number="1">
<demand_id dtype="int" in_var="" out_var="">{demand_id}</demand_id>
<due_dt in_var="" out_var="">{eta_dt}</due_dt>
<due_tm in_var="" out_var="">{eta_tm_</due_tm>
</row>
</demand_material>
</action>
</state>
</session>
</root>
If you really want to have the eta date and time out of a activity, a separate Process flow will have to be created that update a customized field at order level, this customized field could then be mapped for updating due date and time in excecute action inside the material condition.
Regards,
Robin(centric)
Hi @robinsch
sory for the delay (vacation) ., Thanks for your explanation. Very helpful.
Regards
anthony