Updating Sales Order Rel Need by Dates

Hi,

We are looking to implement a customisation where by we can
reschedule our sales order releases. We have a number of sales order
releases(per SO/line) which are attached to project(s). When these
get initially loaded they are loaded with estimated dates for
cashflow. However, we will need to reschedule the orders as we move
through the project. As there are potentially 100s of releases, we
would like just to run through the releases an update automatically.
E.g. increment by one month.

I have tried the below code and I just can't get it to work. It will
update the screen, but when I hit the save button it comes up with an
error with regards to SalesOrderhead no changes made.

I was wondering if someone could point me in the right direction.

Thanks in advance.

Private Sub btnEpiCustom2_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnEpiCustom2.Click
'// ** Place Event Handling Code Here **
Dim edvhead As EpiDataView = CType(oTrans.EpiDataViews
("OrderHed"),EpiDataView)
Dim edvdtl As EpiDataView = CType(oTrans.EpiDataViews
("Orderdtl"),EpiDataView)
Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("OrderRel"),EpiDataView)

For Each dr As DataRow in edv.dataView.Table.Rows

if dr("orderline") = nedepicustom1.value then

dr("NeedbyDate") = #01/01/2037#
dr("ReqDate") = dr("NeedbyDate")

end if
Next




otrans.notifyall()
otrans.update()
' otrans.refresh()