Assuming I only have the OrderNumber, is there a way to get the GUID for that order via the API?
Thanks,
Peter
GUID/OrderNumber
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: GUID/OrderNumber
Search the order store. There you can create all types of searches based on addresses, contact names, profiles, dates, etc. Look at SoftPro.OrderTracking.Client.Orders.IOrderInfo to see all the possibilities.
In this example, I'll look for order number 2014080009 .
In this example, I'll look for order number 2014080009 .
Code: Select all
// Get the IOrderStore object.
SelectServer ss = GetService<SelectServer>();
IOrderStore os = ss.GetService<IOrderStore>();
// Search the order store for the desired number.
IOrderInfo oi = os.Orders.Where(t => t.Number == "2014080009").FirstOrDefault();
if (oi != null)
{
// Valid order number: got order Guid and latest Version.
Guid orderGuid = oi.Identifier.Guid;
}
Bob Richards, Senior Software Developer, SoftPro