Index -1 is either negative or above rows count

OK, I think I found my own answer (I always try many times before I post
something, but posting also makes me think more in depth about the
issue)...



Since my demand delivery days are sub key of OrderRel, I have to have a
new order, with a line, with a release before I can change the need by
date. So far, this seems to be working.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of karen_schoenung
Sent: Tuesday, August 25, 2009 11:05 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Index -1 is either negative or above rows count





Hi,

On my TEST system, I have a Foreign key and sub key to show the Ship to
Demand Delivery Days on the order header, line and release. I also have
code to update the ship by date based on the after field change of the
NeedByDate...The code seems to be working on existing orders.

However, I do not know if I need additional code for a new order and
trying to update the ship by date based on the NeedByDate - Demand
Delivery Days.

The subject line shows the error I am getting if I try to change a
NeedByDate on a new order. I expect it is because I am trying to update
a row that does not yet exist.

Can anyone point me to a direction to start for sample code for add new
row and update new row ship by date based on need by date - demand
delivery days?

Thank you,
Karen





[Non-text portions of this message have been removed]
Hi,

On my TEST system, I have a Foreign key and sub key to show the Ship to Demand Delivery Days on the order header, line and release. I also have code to update the ship by date based on the after field change of the NeedByDate...The code seems to be working on existing orders.

However, I do not know if I need additional code for a new order and trying to update the ship by date based on the NeedByDate - Demand Delivery Days.

The subject line shows the error I am getting if I try to change a NeedByDate on a new order. I expect it is because I am trying to update a row that does not yet exist.

Can anyone point me to a direction to start for sample code for add new row and update new row ship by date based on need by date - demand delivery days?

Thank you,
Karen