Cameron API New Order - custom order # not working

Discussions related to custom development with Select.
Post Reply
PeterKelly
Posts: 92
Joined: Tue Feb 04, 2014 3:34 pm

Cameron API New Order - custom order # not working

Post by PeterKelly »

Our system was upgraded to SP2 yesterday and since then the order numbers have been auto-generated even though I supply the #. This worked many times prior to the upgrade.

Now, the DB was wiped out so not sure if some configuration data is needed for custom numbers.

Version= 3.0.10820.192

Even if I use the simple code from a previous posting, my order # is ignored and one will be created in the form 2014020XX where XX starts at 01. That is what I see when I I do a manual search in the UI.

Code:


string strOrderNumber = "123";

var spec = new OrderCreationSpec()
{
Number = strOrderNumber
};

order = os.NewOrder(spec);
{
order.Project = "Setting a simple string property.";
os.ApplyChanges(order);
}

any ideas?
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Cameron API New Order - custom order # not working

Post by john.morton »

Try setting OrderCreationSpec.BaseOrderNumber instead of OrderCreationSpec.Number. "Number" actually becomes a combination of the prefix, baseOrderNumber, and suffix.
PeterKelly
Posts: 92
Joined: Tue Feb 04, 2014 3:34 pm

Re: Cameron API New Order - custom order # not working

Post by PeterKelly »

I will try that. Did that change?

It worked many times in the previous build that ended with .130 I believe.
PeterKelly
Posts: 92
Joined: Tue Feb 04, 2014 3:34 pm

Re: Cameron API New Order - custom order # not working

Post by PeterKelly »

I tried BaseNumber since BaseOrderNumber didn't exist but I get an exception when saving.


//OrderCreationSpec spec = new OrderCreationSpec() { Number = strOrderNumber };
OrderCreationSpec spec = new OrderCreationSpec() { BaseNumber = strOrderNumber };


Test method SoftPro.Select.LoadTest.UnitTest.Perf_SP_NewOrderFull threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.

SoftPro.OrderTracking.Client.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.EndApplyChanges(IAsyncResult ar)
SoftPro.OrderTracking.Client.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.ApplyChanges(IOrder order)
CallSite.Target(Closure , CallSite , IOrderStore , Object )
System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
SoftPro.Select.LoadTest.UnitTest.SP_SaveOrder(String strTrans, Object order, MyUserObject userObject) in C:\Users\pekelly\Documents\Visual Studio 2010\Projects\Load\TestCameron_Common.cs: line 454
CallSite.Target(Closure , CallSite , UnitTest , String , Object , MyUserObject )
System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
SoftPro.Select.LoadTest.UnitTest.Perf_SP_NewOrderFull() in C:\Users\pekelly\Documents\Visual Studio 2010\Projects\Load\PerfTestCameron_TestMethods.cs: line 172
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Cameron API New Order - custom order # not working

Post by john.morton »

That behavior has been marked as a bug. It will be fixed in service pack 3.
PeterKelly
Posts: 92
Joined: Tue Feb 04, 2014 3:34 pm

Re: Cameron API New Order - custom order # not working

Post by PeterKelly »

What is the approximate delivery date for SP3?
Melissa McBerkowitz
Posts: 91
Joined: Wed Sep 10, 2008 3:33 pm
Location: Raleigh, NC
Contact:

Re: Cameron API New Order - custom order # not working

Post by Melissa McBerkowitz »

We are still working to determine timelines for SP3, so don't have an estimated ship date yet. We are also investigating whether this can be addressed in a hotfix so you don't have to wait for SP3. We'll let you know if so.
Melissa McBerkowitz
VP of Product Strategy, SoftPro
Post Reply