BV Commerce Forum
»
BV Commerce Support
»
General Support
»
Order Manager-Object Ref not set to instance of an object
Rank: Member
Joined: 2/28/2008(UTC) Posts: 36
|
Hi guys, I tried searching for this and came up empty. I'm getting an "Object Ref not set to instance of an object" error when I'm in the Admin Tool. Under the tab >Orders >Order Manager. When I click the icon in the shipping column I get the error, but not for all orders. I'm currently comparing the data to see if there is something missing from the orders that the app cannot read, thus causing the error. The actual page recieving the error is: http://<mysite>/BVAdmin/Orders/ShipOrder.aspx Has anyone else ever encountered this? Thanks in advance for any help/advice!! P.S. I'm attaching a screenshot of the error, if anyone is good at reading the stack trace. gastip attached the following image(s): OrdersError.gif (100kb) downloaded 40 time(s).You cannot view/download attachments. Try to login or register.
|
|
|
|
Rank: Member
Joined: 2/28/2008(UTC) Posts: 36
|
Update:
After turning on the debugging on that page, the error reads:
Line 115: Dim SKUField As Label = e.Row.FindControl("SKUField") Line 116: If SKUField IsNot Nothing Then [color=red>Line][/color]Line 118: End If
So now I'm digging to see where that lineItem.AssociatedProduct.Sku property gets assigned.
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
Isolate the product thats causing this error and see whats going on. The way you do it is this;
1. Determine the product bvin which is in the line item 2. Look at the product details for that bvin |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 2/28/2008(UTC) Posts: 36
|
Thanks for the help Satya, but I don't see the bvin anywhere. To which line item are you referring, the object?
I don't have the cart set up on a system where I can use a debugger. So I can't use the watch window or locals. I was able to write out the bvin to the screen using [2] SKUField.Text = lineItem.Bvin()
But I dont think this is the Bvin for the product (it's not in my product table and it actually works on the page), so I think it's maybe an order bvin or something. [/2]
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
LineItem.ProductID gives the bvin for the product. Then lookup the product details based on the bvin. There is something wrong with the product. I assume you are debugging in Visual Studio. Are you not? |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 2/28/2008(UTC) Posts: 36
|
Thanks again. I'm developing in VS but my local copy would never build, so I can't use the debugger. Knowing to look for the product ID helps a lot!!
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
Originally Posted by: "gastip"
Update:
After turning on the debugging on that page, the error reads:
Line 115: Dim SKUField As Label = e.Row.FindControl("SKUField") Line 116: If SKUField IsNot Nothing Then [color=red>Line][/color]Line 118: End If
So now I'm digging to see where that lineItem.AssociatedProduct.Sku property gets assigned.
This usually means you deleted a product or variant after the order was placed (which leads to AssociatedProduct being null). By the way, the Sku property can be null. That would not cause a null reference exception (at least in this case). It is the null AssociatedProduct that is causing the problem. |
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
That is right. If he knows the bvin of the product then he can figure out if the product exists or not. Thats where I was heading with him. |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 2/28/2008(UTC) Posts: 36
|
Thanks for all the help guys. It was exactly what you said it would be. The client has been messing around and had deleted some products that had some test orders against them.
Thanks again!!
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
|
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.