Developer forum

Forum » Development » Get all orders by API, including impersonated

Get all orders by API, including impersonated

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

I need to get a collection of all orders, completed within a certain period of time, by the customer himself or by impersonation.

If I use the CustomerOrderCollection, loading it with the customers ID, I will not get the ones completed by impersonation.
I've setup impersonation to only mark the order, with the impersonated user.

I'm using the CustomerOrderCollectionFilter to filter the orders afterwards, so using the normal OrderCollection is not an option here.

Is the only way, to change the settings of impersonation, to replace the current user with the impersonated user?

Best regards
Kurt Moskjaer Andersen


Replies

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

... or should I use the GetOrders method from Dynamicweb.Ecommerce.Orders mentioned at http://doc.dynamicweb.com/api/html/db2ddc50-345f-7ffb-d7e4-2509aa564da9.htm instead ?

/Kurt

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Kurt

Either your second suggestion or use the one that takes a SQL statement. I think that is the best option.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum