Page 1 of 1

Error on caling OrderTracking.SaveOrder

Posted: Thu Sep 08, 2011 6:55 pm
by kqian
When creating new order through API, it returns false on calling OrderTracking.SaveOrder and the messge show an error of "Object reference not set to an instance of an object".
Our app has been working fine before. Can anyone help? Thanks.

A first chance exception of type 'System.NullReferenceException' occurred in SoftPro.BusinessObjects.Core.dll
w3wp.exe Error: 0 : System.NullReferenceException: Object reference not set to an instance of an object.
Stack Trace:
at SoftPro.BusinessObjects.Core.Order.InitializeOrderTrackingEventData()
at SoftPro.BusinessObjects.Core.Order.SaveRoot(Boolean ignoreWarnings)
at SoftPro.OrderTracking.Client.OrderTracking.SaveOrder(IOrder order, ValidationMessage[]& messages)
XML Log:
<ILExceptionData>
<Point module="SoftPro.BusinessObjects.Core.dll" classFull="SoftPro.BusinessObjects.Core.Order" methodName="InitializeOrderTrackingEventData" methodSignature="Void InitializeOrderTrackingEventData()" methodToken="0x6000fd1" ILOffset="31" />
<Point module="SoftPro.BusinessObjects.Core.dll" classFull="SoftPro.BusinessObjects.Core.Order" methodName="SaveRoot" methodSignature="SoftPro.BusinessObjects.Base.ValidationError[] SaveRoot(Boolean)" methodToken="0x6000fdd" ILOffset="45" />
<Point module="SoftPro.OrderTracking.Client.dll" classFull="SoftPro.OrderTracking.Client.OrderTracking" methodName="SaveOrder" methodSignature="Boolean SaveOrder(SoftPro.OrderTracking.Client.IOrder, SoftPro.Select.Common.ValidationMessage[] ByRef)" methodToken="0x6004052" ILOffset="90" />
</ILExceptionData>

Re: Error on caling OrderTracking.SaveOrder

Posted: Fri Sep 09, 2011 9:59 am
by Mark McKenna
One thing to (double) check is that the owning profile ID you are assigning when the order is created is accurate. Is that something that has varied between the time it worked and when it stopped? If the profile ID is not the culprit, please let us know the version of Select you are using and what may have changed (e.g. product upgrade, etc.).

Re: Error on caling OrderTracking.SaveOrder

Posted: Fri Sep 09, 2011 1:43 pm
by kqian
Yes, you are right, it turned out to be the Profile GUID mismatch due to recent change in Select DB. Porblem solved. Thanks.