# order.GetAsCarrier() dropping order rows

**URL:** <https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [June 16, 2020, 8:39am UTC](https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534 "2020-06-16T08:39:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![victaxel](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/victaxel/32/159_2.png) [@victaxel](https://forum.litium.com/u/victaxel)\
**Post date:** [June 16, 2020, 8:39am UTC](https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534/1 "2020-06-16T08:39:32Z")

</div>

Hi,

I have a task running every 15 minutes which gets all orders with a certain order status and performs some operations on them.

When ExecuteTask runs, \_moduleECommerce.Orders.GetOrder(orderId, token) runs and successfully gets the expected orders and I can see that there is a collection of the expected number of order rows. directly after that, order.GetAsCarrier() runs and when it has finished, the returned carrier object’s order rows collection is empty (Count == 0). No operations are performed in between the GetOrder and the GetAsCarrier calls. There are no visible errors when the two methods run.

Any idea how this could happen?

---

<div class="post-metadata">

**Author:** ![victaxel](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/victaxel/32/159_2.png) [@victaxel](https://forum.litium.com/u/victaxel)\
**Post date:** [June 16, 2020, 8:44am UTC](https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534/2 "2020-06-16T08:44:42Z")

</div>

Some screenshots:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/74292941134e5b92a24b0fbd9650718fbdd750d3.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/55f8e83c3189c0cc1e61f5631a7cdc2513804c6c.png)

---

<div class="post-metadata">

**Author:** ![aram](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/aram/32/19_2.png) [@aram](https://forum.litium.com/u/aram)\
**Post date:** [June 16, 2020, 9:19am UTC](https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534/3 "2020-06-16T09:19:50Z")

</div>

what if you try with this overload of `GetAsCarrier()`:  
`order.GetAsCarrier(true, true, true, true, true, true);` the fifth parameter i includeOrderRows.

---

<div class="post-metadata">

**Author:** ![victaxel](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/victaxel/32/159_2.png) [@victaxel](https://forum.litium.com/u/victaxel)\
**Post date:** [June 16, 2020, 9:24am UTC](https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534/4 "2020-06-16T09:24:59Z")

</div>

> [@aram](#):
>
> true, true, true, true, true, true

Wow, it never even occured to me to check for overloads…

This was indeed the solution. Thanks Aram!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [July 14, 2020, 9:25am UTC](https://forum.litium.com/t/order-getascarrier-dropping-order-rows/1534/5 "2020-07-14T09:25:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
