Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Soeren Sprogoe 575 posts 259 karma points
    Dec 08, 2010 @ 13:42
    Soeren Sprogoe
    0

    Change order status via API

    Any tips on how to change a PurchaseOrder's status via the API?

    Can't seem to find a specific method for it.

    Do I just set PurchaseOrder.OrderStatus to a new one?
    Is the audit automatically updated to reflect this?
    And are any associated pipelines automatically executed, or do I need to this manually?

    Best regards,
    Soeren Sprogoe

  • Lasse Eskildsen 34 posts 57 karma points
    Dec 09, 2010 @ 11:23
    Lasse Eskildsen
    0

    Hi Søren,

    For the pipelines to run and the audit trail to be updated, you need to use the UCommerce.Transactions.OrderService class. Just pass your order, new status and optinally a username to the service, and it will take care the rest.

    You can get an instance of the service though the ObjectFactory:

    var service = ObjectFactory.Instance.Resolve<IOrderService>();

    - Lasse

Please Sign in or register to post replies

Write your reply to:

Draft