Hi-
In the Select UI, the user already has an Order open, and they can choose to overlay that open order with another one.
What options do I have to audit that action?
Basically, I'd like to record something like
"User xyz overlaid order number abc with order number def."
I know the order has not been saved to the db until the user clicks the Save button, but are there UI events to which I can subscribe to capture the source of the overlay ?
...or am I at the mercy of the server-side Order Saved event, and even then I'm not sure if this type of information is available.
Advice appreciated.
Regards,
Todd
How do I audit an Overlay Order action?
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: How do I audit an Overlay Order action?
The overlay order number is captured to the Order History log. Open the order, click Order History then look for Overlay Order in the descriptions. If you double-click on the version record, you can see the order number that was overlaid.
Bob Richards, Senior Software Developer, SoftPro
Re: How do I audit an Overlay Order action?
...and how to do that via the API ?
Thanks.
-Todd
Thanks.
-Todd
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: How do I audit an Overlay Order action?
There are two sources of information - The first is if you are just concerned with template operations:
Open the order from the OrderStore then examine the order TemplateHistory collection. There will be an entry for each operation with an OverlayAction of:
Open the order from the OrderStore then examine the order TemplateHistory collection. There will be an entry for each operation with an OverlayAction of:
- OnOrderCreation - Loaded during initial order creation
- ApplyTemplate - Apply Template operation
- Overlay - Overlay Order operation
Code: Select all
// Open order (read-only in this example).
IOrderStore os = ss.GetService<IOrderStore>();
IOrderInfo orderInfo = os.Orders.Where(t => t.Number == "XAT17000007").FirstOrDefault();
IOrder iOrder = os.OpenOrder(orderInfo, true);
// Get all order history from latest order.
IOrderHistory[] hx = os.GetOrderHistory(new OrderIdentifier(iOrder.Guid, -1));
Bob Richards, Senior Software Developer, SoftPro