Vantage 8x: SalesOrder Adapter Update function

Correct. I am in the Part Maintenance screen, trying to use the SalesOrderAdapter.


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Thursday, April 18, 2013 5:58 PM
To: Vantage
Subject: RE: [Vantage] Vantage 8x: SalesOrder Adapter Update function

Just so that I am clear you are not in the sales order screen correct?
On Apr 18, 2013 7:48 PM, "Dan Godfrey" <dgodfrey@...> wrote:

> **
>
>
> Let me see if I can clarify more. Since I can only activate the
> special code from the TEST button, I can save the form with CheckBox05
> changed and not call my code and EVERYTHING is happy. I definitely know it is my code.
>
> Now, with the function the only problem is that the SalesOrderAdpater
> just won't update the appropriate OrderDtl records. When my function
> is called I log my steps.
> - I have identified that I get the appropriate rows in the
> SalesOrderAdapter.
> - I do get to the point of calling the SalesOrderAdpater.Update method.
> - The update method returns false and then the code moves on happy and
> closes the function normally.
> There are no errors to report.
>
> So I think that there is something that I am missing like how to
> re-apply the dataset to the adapter before calling the update method
> or something like that. The problem is that I have found that the
> SalesOrderAdapter.SalesOrderData dataset is readonly is Vantage 8x. So
> trying to assign the dataset that I get from GetRows back to the
> SalesOrderAdapter.SalesOrderData dataset I get an error ("Property
> 'SalesOrderData' is 'ReadOnly'."). So I don't know how to alter the
> datasest in the adapter so that it will update anything.
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Jose Gomez
> Sent: Thursday, April 18, 2013 4:19 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> So just for testing try doing a blank customization calling get by I'd
> and changing one field and calling updates. If that works we can
> narrow it down to your code vs a different system bpm or data problem
> On Apr 9, 2013 3:30 PM, "dgodfrey_amc" <dgodfrey@...> wrote:
>
> > **
> >
> >
> > Has anyone ever use the Sales Order Adapter in customization? I am
> > not looking to added a line or release. I just want to edit current SO lines?
> > for whatever reason I can not get the update to work.
> >
> > Here is my code:
> >
> > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > String) As String Dim sRet AS String = String.Empty Dim edvPart As
> > EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > EpiDataView)
> > If(edvPart.Row > -1) Then
> > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.G
> > et
> > Type()))
> > Then
> > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > End If
> > End If
> > return sRet
> > End Function
> >
> > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean = False
> > Dim adSalesOrder As SalesOrderAdapter = New
> > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Ro
> > ws
> > DataSet)
> > adSalesOrder.BOConnect()
> > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> > AND OpenLine = True"
> > Dim MorePages As Boolean
> > opts.NamedSearch.WhereClauses.Clear()
> > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > WriteToLogFile(whereClause)
> > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > Orders Lines found(" &
> > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> > WriteToLogFile("Open Sales Orders Lines found(" &
> > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > &
> > chkQualityHold.Checked)
> > IF(chkQualityHold.Checked = True) Then
> > '/**************************************/
> >
> > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > dr.Item("CheckBox01") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > be
> > updated.")
> > Next
> > End If
> > '/**************************************/
> > sMessage = sPartNum & " is placed on Quality HOLD."
> > Else'IF(chkQualityHold.Checked = True) Then 'If
> > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > dr.Item("CheckBox02") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > be
> > updated.")
> > Next
> > End If
> > sMessage = sPartNum & " is taken off Quality HOLD."
> > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> > WriteToLogFile("Updating all Sales Orders edited.")
> > adSalesOrder.Update()
> > End If
> > adSalesOrder.Dispose()
> > 'dsSalesOrder.Dispose()
> > bQualityHoldChanged = False
> > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > Status") End If WriteToLogFile("Closing
> > UpdateSOFromQualityHoldChange
> > Function") Catch ex As System.Exception
> > ExceptionBox.Show(ex)
> > End Try
> > End Sub
> >
> > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args
> > As
> > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> > End Sub
> >
> > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args
> > As
> > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > Handling Code Here **
> > UpdateSOFromQualityHoldChange()
> > End Sub
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access.
> )
> (1) To access the Files Section of our Yahoo!Group for Report Builder
> and Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> information (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export
> Administration Regulations (EAR). This information may not be
> exported, released, or disclosed to foreign persons either inside or
> outside the United States without first obtaining the proper U.S.
> export license or written authorization. In addition, the information
> and articles described herein are either patented or proprietary, and
> the copying or reproduction thereof is prohibited without ADVANCED
> Motion Controls prior written consent. If you are not the intended
> recipient (or have received this e-mail in error), please notify the
> sender immediately and destroy this e-mail. Any unauthorized copying,
> disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
Has anyone ever use the Sales Order Adapter in customization? I am not looking to added a line or release. I just want to edit current SO lines? for whatever reason I can not get the update to work.

Here is my code:

Private Function GetStringFromPartDataView(ByVal ColumnName AS String) As String
Dim sRet AS String = String.Empty
Dim edvPart As EpiDataView = CType(oTrans.EpiDataViews("Part"), EpiDataView)
If(edvPart.Row > -1) Then
IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.GetType())) Then
sRet = edvPart.dataView(edvPart.Row)(ColumnName)
End If
End If
return sRet
End Function


Private Sub UpdateSOFromQualityHoldChange()
WriteToLogFile("Inside UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " & chkQualityHold.Checked & "; bQualityHoldChanged = " & bQualityHoldChanged)
Try
Dim sMessage AS String = ""
Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
IF (bQualityHoldChanged = True) Then
Dim bDirty AS Boolean = False
Dim adSalesOrder As SalesOrderAdapter = New SalesOrderAdapter(PartForm)
Dim dsSalesOrder AS Data.DataSet' = adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.RowsDataSet)
adSalesOrder.BOConnect()
Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "' AND OpenLine = True"
Dim MorePages As Boolean
opts.NamedSearch.WhereClauses.Clear()
opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
WriteToLogFile(whereClause)
opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
adSalesOrder.GetRows(opts, MorePages)
'WriteToLogFile("Open Sales Orders Lines found(" & adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
WriteToLogFile("Open Sales Orders Lines found(" & adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " & sPartNum)
WriteToLogFile("Setting the Sales Order Hold Status to: " & chkQualityHold.Checked)
IF(chkQualityHold.Checked = True) Then
'/**************************************/

'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
If (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
dr.Item("CheckBox02") = dr.Item("CheckBox01")
dr.Item("CheckBox01") = chkQualityHold.Checked
dr.Item("RowMod") = "U"
bDirty = True
WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be updated.")
Next
End If
'/**************************************/
sMessage = sPartNum & " is placed on Quality HOLD."
Else'IF(chkQualityHold.Checked = True) Then
'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
If (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
dr.Item("CheckBox01") = dr.Item("CheckBox02")
dr.Item("CheckBox02") = chkQualityHold.Checked
dr.Item("RowMod") = "U"
bDirty = True
WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be updated.")
Next
End If
sMessage = sPartNum & " is taken off Quality HOLD."
End IF'IF(chkQualityHold.Checked = True) Then
IF(bDirty = True) Then
WriteToLogFile("Updating all Sales Orders edited.")
adSalesOrder.Update()
End If
adSalesOrder.Dispose()
'dsSalesOrder.Dispose()
bQualityHoldChanged = False
'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold Status")
End If
WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function")
Catch ex As System.Exception
ExceptionBox.Show(ex)
End Try
End Sub

Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles chkQualityHold.Click
'// ** Place Event Handling Code Here **
bQualityHoldChanged = NOT bQualityHoldChanged
End Sub

Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnQualityHold.Click
'// ** Place Event Handling Code Here **
UpdateSOFromQualityHoldChange()
End Sub
What error do you get?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...> wrote:

> **
>
>
> Has anyone ever use the Sales Order Adapter in customization? I am not
> looking to added a line or release. I just want to edit current SO lines?
> for whatever reason I can not get the update to work.
>
> Here is my code:
>
> Private Function GetStringFromPartDataView(ByVal ColumnName AS String) As
> String
> Dim sRet AS String = String.Empty
> Dim edvPart As EpiDataView = CType(oTrans.EpiDataViews("Part"),
> EpiDataView)
> If(edvPart.Row > -1) Then
> IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.GetType()))
> Then
> sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> End If
> End If
> return sRet
> End Function
>
> Private Sub UpdateSOFromQualityHoldChange()
> WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " & bQualityHoldChanged)
> Try
> Dim sMessage AS String = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> IF (bQualityHoldChanged = True) Then
> Dim bDirty AS Boolean = False
> Dim adSalesOrder As SalesOrderAdapter = New SalesOrderAdapter(PartForm)
> Dim dsSalesOrder AS Data.DataSet' =
> adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.RowsDataSet)
> adSalesOrder.BOConnect()
> Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "' AND
> OpenLine = True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> WriteToLogFile(whereClause)
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> adSalesOrder.GetRows(opts, MorePages)
> 'WriteToLogFile("Open Sales Orders Lines found(" &
> adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> WriteToLogFile("Open Sales Orders Lines found(" &
> adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " & sPartNum)
> WriteToLogFile("Setting the Sales Order Hold Status to: " &
> chkQualityHold.Checked)
> IF(chkQualityHold.Checked = True) Then
> '/**************************************/
>
> 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
> If (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox02") = dr.Item("CheckBox01")
> dr.Item("CheckBox01") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> '/**************************************/
> sMessage = sPartNum & " is placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = True) Then
> 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
> If (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox01") = dr.Item("CheckBox02")
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> sMessage = sPartNum & " is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then
> IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.")
> adSalesOrder.Update()
> End If
> adSalesOrder.Dispose()
> 'dsSalesOrder.Dispose()
> bQualityHoldChanged = False
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold Status")
> End If
> WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function")
> Catch ex As System.Exception
> ExceptionBox.Show(ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click
> '// ** Place Event Handling Code Here **
> bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click
> '// ** Place Event Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


[Non-text portions of this message have been removed]
I don't get an error. My records just don't get updated one way and the other just has no data.


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Tuesday, April 09, 2013 12:34 PM
To: Vantage
Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function

What error do you get?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...> wrote:

> **
>
>
> Has anyone ever use the Sales Order Adapter in customization? I am not
> looking to added a line or release. I just want to edit current SO lines?
> for whatever reason I can not get the update to work.
>
> Here is my code:
>
> Private Function GetStringFromPartDataView(ByVal ColumnName AS String)
> As String Dim sRet AS String = String.Empty Dim edvPart As EpiDataView
> = CType(oTrans.EpiDataViews("Part"),
> EpiDataView)
> If(edvPart.Row > -1) Then
> IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.Get
> Type()))
> Then
> sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> End If
> End If
> return sRet
> End Function
>
> Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " &
> bQualityHoldChanged) Try Dim sMessage AS String = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> IF (bQualityHoldChanged = True) Then
> Dim bDirty AS Boolean = False
> Dim adSalesOrder As SalesOrderAdapter = New
> SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Rows
> DataSet)
> adSalesOrder.BOConnect()
> Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> AND OpenLine = True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> WriteToLogFile(whereClause)
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> Orders Lines found(" &
> adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> WriteToLogFile("Open Sales Orders Lines found(" &
> adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: " &
> chkQualityHold.Checked)
> IF(chkQualityHold.Checked = True) Then
> '/**************************************/
>
> 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox02") = dr.Item("CheckBox01")
> dr.Item("CheckBox01") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> '/**************************************/
> sMessage = sPartNum & " is placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = True) Then 'If
> (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox01") = dr.Item("CheckBox02")
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> sMessage = sPartNum & " is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.")
> adSalesOrder.Update()
> End If
> adSalesOrder.Dispose()
> 'dsSalesOrder.Dispose()
> bQualityHoldChanged = False
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> Status") End If WriteToLogFile("Closing UpdateSOFromQualityHoldChange
> Function") Catch ex As System.Exception
> ExceptionBox.Show(ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
does your adapter return true?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:

> **
>
>
> I don't get an error. My records just don't get updated one way and the
> other just has no data.
>
> Dan Godfrey
> (805) 389-1935 x 251
>
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jose Gomez
> Sent: Tuesday, April 09, 2013 12:34 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> What error do you get?
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...> wrote:
>
> > **
>
> >
> >
> > Has anyone ever use the Sales Order Adapter in customization? I am not
> > looking to added a line or release. I just want to edit current SO lines?
> > for whatever reason I can not get the update to work.
> >
> > Here is my code:
> >
> > Private Function GetStringFromPartDataView(ByVal ColumnName AS String)
> > As String Dim sRet AS String = String.Empty Dim edvPart As EpiDataView
> > = CType(oTrans.EpiDataViews("Part"),
> > EpiDataView)
> > If(edvPart.Row > -1) Then
> > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.Get
> > Type()))
> > Then
> > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > End If
> > End If
> > return sRet
> > End Function
> >
> > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > IF (bQualityHoldChanged = True) Then
> > Dim bDirty AS Boolean = False
> > Dim adSalesOrder As SalesOrderAdapter = New
> > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Rows
> > DataSet)
> > adSalesOrder.BOConnect()
> > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> > AND OpenLine = True"
> > Dim MorePages As Boolean
> > opts.NamedSearch.WhereClauses.Clear()
> > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > WriteToLogFile(whereClause)
> > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > Orders Lines found(" &
> > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> > WriteToLogFile("Open Sales Orders Lines found(" &
> > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: " &
> > chkQualityHold.Checked)
> > IF(chkQualityHold.Checked = True) Then
> > '/**************************************/
> >
> > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> > dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > dr.Item("CheckBox01") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> > updated.")
> > Next
> > End If
> > '/**************************************/
> > sMessage = sPartNum & " is placed on Quality HOLD."
> > Else'IF(chkQualityHold.Checked = True) Then 'If
> > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> > dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > dr.Item("CheckBox02") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> > updated.")
> > Next
> > End If
> > sMessage = sPartNum & " is taken off Quality HOLD."
> > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> > WriteToLogFile("Updating all Sales Orders edited.")
> > adSalesOrder.Update()
> > End If
> > adSalesOrder.Dispose()
> > 'dsSalesOrder.Dispose()
> > bQualityHoldChanged = False
> > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > Status") End If WriteToLogFile("Closing UpdateSOFromQualityHoldChange
> > Function") Catch ex As System.Exception
> > ExceptionBox.Show(ex)
> > End Try
> > End Sub
> >
> > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> > End Sub
> >
> > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > Handling Code Here **
> > UpdateSOFromQualityHoldChange()
> > End Sub
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information
> (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export Administration
> Regulations (EAR). This information may not be exported, released, or
> disclosed to foreign persons either inside or outside the United States
> without first obtaining the proper U.S. export license or written
> authorization. In addition, the information and articles described herein
> are either patented or proprietary, and the copying or reproduction thereof
> is prohibited without ADVANCED Motion Controls prior written consent. If
> you are not the intended recipient (or have received this e-mail in error),
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden. Thank you for your compliance.
>
>
>


[Non-text portions of this message have been removed]
The update function returned false


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Tuesday, April 09, 2013 12:46 PM
To: Vantage
Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function

does your adapter return true?


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:

> **
>
>
> I don't get an error. My records just don't get updated one way and
> the other just has no data.
>
> Dan Godfrey
> (805) 389-1935 x 251
>
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Jose Gomez
> Sent: Tuesday, April 09, 2013 12:34 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> What error do you get?
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>
> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez>
> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...> wrote:
>
> > **
>
> >
> >
> > Has anyone ever use the Sales Order Adapter in customization? I am
> > not looking to added a line or release. I just want to edit current SO lines?
> > for whatever reason I can not get the update to work.
> >
> > Here is my code:
> >
> > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > String) As String Dim sRet AS String = String.Empty Dim edvPart As
> > EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > EpiDataView)
> > If(edvPart.Row > -1) Then
> > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.G
> > et
> > Type()))
> > Then
> > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > End If
> > End If
> > return sRet
> > End Function
> >
> > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean = False
> > Dim adSalesOrder As SalesOrderAdapter = New
> > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Ro
> > ws
> > DataSet)
> > adSalesOrder.BOConnect()
> > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> > AND OpenLine = True"
> > Dim MorePages As Boolean
> > opts.NamedSearch.WhereClauses.Clear()
> > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > WriteToLogFile(whereClause)
> > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > Orders Lines found(" &
> > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> > WriteToLogFile("Open Sales Orders Lines found(" &
> > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > &
> > chkQualityHold.Checked)
> > IF(chkQualityHold.Checked = True) Then
> > '/**************************************/
> >
> > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > dr.Item("CheckBox01") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > be
> > updated.")
> > Next
> > End If
> > '/**************************************/
> > sMessage = sPartNum & " is placed on Quality HOLD."
> > Else'IF(chkQualityHold.Checked = True) Then 'If
> > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > dr.Item("CheckBox02") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > be
> > updated.")
> > Next
> > End If
> > sMessage = sPartNum & " is taken off Quality HOLD."
> > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> > WriteToLogFile("Updating all Sales Orders edited.")
> > adSalesOrder.Update()
> > End If
> > adSalesOrder.Dispose()
> > 'dsSalesOrder.Dispose()
> > bQualityHoldChanged = False
> > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > Status") End If WriteToLogFile("Closing
> > UpdateSOFromQualityHoldChange
> > Function") Catch ex As System.Exception
> > ExceptionBox.Show(ex)
> > End Try
> > End Sub
> >
> > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args
> > As
> > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> > End Sub
> >
> > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args
> > As
> > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > Handling Code Here **
> > UpdateSOFromQualityHoldChange()
> > End Sub
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access.
> )
> (1) To access the Files Section of our Yahoo!Group for Report Builder
> and Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> information (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export
> Administration Regulations (EAR). This information may not be
> exported, released, or disclosed to foreign persons either inside or
> outside the United States without first obtaining the proper U.S.
> export license or written authorization. In addition, the information
> and articles described herein are either patented or proprietary, and
> the copying or reproduction thereof is prohibited without ADVANCED
> Motion Controls prior written consent. If you are not the intended
> recipient (or have received this e-mail in error), please notify the
> sender immediately and destroy this e-mail. Any unauthorized copying,
> disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
>
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
ok so it is not successful use a Try Catch and get the error. adn see what
t is.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Apr 9, 2013 at 4:46 PM, Dan Godfrey <dgodfrey@...> wrote:

> **
>
>
> The update function returned false
>
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jose Gomez
> Sent: Tuesday, April 09, 2013 12:46 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> does your adapter return true?
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:
>
> > **
>
> >
> >
> > I don't get an error. My records just don't get updated one way and
> > the other just has no data.
> >
> > Dan Godfrey
> > (805) 389-1935 x 251
> >
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > Behalf Of Jose Gomez
> > Sent: Tuesday, April 09, 2013 12:34 PM
> > To: Vantage
> > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
> >
> > What error do you get?
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez>
> > <http://www.facebook.com/josegomez
> > >
> > <http://www.google.com/profiles/jose.gomez>
> > <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> > On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...> wrote:
> >
> > > **
> >
> > >
> > >
> > > Has anyone ever use the Sales Order Adapter in customization? I am
> > > not looking to added a line or release. I just want to edit current SO
> lines?
> > > for whatever reason I can not get the update to work.
> > >
> > > Here is my code:
> > >
> > > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > > String) As String Dim sRet AS String = String.Empty Dim edvPart As
> > > EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > > EpiDataView)
> > > If(edvPart.Row > -1) Then
> > > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.G
> > > et
> > > Type()))
> > > Then
> > > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > > End If
> > > End If
> > > return sRet
> > > End Function
> > >
> > > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean = False
> > > Dim adSalesOrder As SalesOrderAdapter = New
> > > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Ro
> > > ws
> > > DataSet)
> > > adSalesOrder.BOConnect()
> > > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> > > AND OpenLine = True"
> > > Dim MorePages As Boolean
> > > opts.NamedSearch.WhereClauses.Clear()
> > > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > > WriteToLogFile(whereClause)
> > > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > > Orders Lines found(" &
> > > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> > > WriteToLogFile("Open Sales Orders Lines found(" &
> > > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > > &
> > > chkQualityHold.Checked)
> > > IF(chkQualityHold.Checked = True) Then
> > > '/**************************************/
> > >
> > > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > > dr.Item("CheckBox01") = chkQualityHold.Checked
> > > dr.Item("RowMod") = "U"
> > > bDirty = True
> > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > > be
> > > updated.")
> > > Next
> > > End If
> > > '/**************************************/
> > > sMessage = sPartNum & " is placed on Quality HOLD."
> > > Else'IF(chkQualityHold.Checked = True) Then 'If
> > > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > > dr.Item("CheckBox02") = chkQualityHold.Checked
> > > dr.Item("RowMod") = "U"
> > > bDirty = True
> > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > > be
> > > updated.")
> > > Next
> > > End If
> > > sMessage = sPartNum & " is taken off Quality HOLD."
> > > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> > > WriteToLogFile("Updating all Sales Orders edited.")
> > > adSalesOrder.Update()
> > > End If
> > > adSalesOrder.Dispose()
> > > 'dsSalesOrder.Dispose()
> > > bQualityHoldChanged = False
> > > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > > Status") End If WriteToLogFile("Closing
> > > UpdateSOFromQualityHoldChange
> > > Function") Catch ex As System.Exception
> > > ExceptionBox.Show(ex)
> > > End Try
> > > End Sub
> > >
> > > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args
> > > As
> > > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > > Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> > > End Sub
> > >
> > > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args
> > > As
> > > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > > Handling Code Here **
> > > UpdateSOFromQualityHoldChange()
> > > End Sub
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> > have already linked your email address to a yahoo id to enable access.
> > )
> > (1) To access the Files Section of our Yahoo!Group for Report Builder
> > and Crystal Reports and other 'goodies', please goto:
> > http://groups.yahoo.com/group/vantage/files/.
> > (2) To search through old msg's goto:
> > http://groups.yahoo.com/group/vantage/messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >
> > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > information (including technology and technical data) which is subject
> to the U.S.
> > International Traffic in Arms Regulations (ITAR) or Export
> > Administration Regulations (EAR). This information may not be
> > exported, released, or disclosed to foreign persons either inside or
> > outside the United States without first obtaining the proper U.S.
> > export license or written authorization. In addition, the information
> > and articles described herein are either patented or proprietary, and
> > the copying or reproduction thereof is prohibited without ADVANCED
> > Motion Controls prior written consent. If you are not the intended
> > recipient (or have received this e-mail in error), please notify the
> > sender immediately and destroy this e-mail. Any unauthorized copying,
> > disclosure or distribution of the material in this e-mail is strictly
> forbidden. Thank you for your compliance.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information
> (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export Administration
> Regulations (EAR). This information may not be exported, released, or
> disclosed to foreign persons either inside or outside the United States
> without first obtaining the proper U.S. export license or written
> authorization. In addition, the information and articles described herein
> are either patented or proprietary, and the copying or reproduction thereof
> is prohibited without ADVANCED Motion Controls prior written consent. If
> you are not the intended recipient (or have received this e-mail in error),
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden. Thank you for your compliance.
>
>
>


[Non-text portions of this message have been removed]
How do I capture an error if it does not throw an error? I ask this because there is a try catch around it right now?


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Tuesday, April 09, 2013 1:55 PM
To: Vantage
Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function

ok so it is not successful use a Try Catch and get the error. adn see what t is.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Apr 9, 2013 at 4:46 PM, Dan Godfrey <dgodfrey@...> wrote:

> **
>
>
> The update function returned false
>
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Jose Gomez
> Sent: Tuesday, April 09, 2013 12:46 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> does your adapter return true?
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>
> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez>
> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:
>
> > **
>
> >
> >
> > I don't get an error. My records just don't get updated one way and
> > the other just has no data.
> >
> > Dan Godfrey
> > (805) 389-1935 x 251
> >
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > Behalf Of Jose Gomez
> > Sent: Tuesday, April 09, 2013 12:34 PM
> > To: Vantage
> > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update
> > function
> >
> > What error do you get?
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez>
> > <http://www.facebook.com/josegomez
> > >
> > <http://www.google.com/profiles/jose.gomez>
> > <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> > On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...> wrote:
> >
> > > **
> >
> > >
> > >
> > > Has anyone ever use the Sales Order Adapter in customization? I am
> > > not looking to added a line or release. I just want to edit
> > > current SO
> lines?
> > > for whatever reason I can not get the update to work.
> > >
> > > Here is my code:
> > >
> > > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > > String) As String Dim sRet AS String = String.Empty Dim edvPart As
> > > EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > > EpiDataView)
> > > If(edvPart.Row > -1) Then
> > > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet
> > > .G
> > > et
> > > Type()))
> > > Then
> > > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > > End If
> > > End If
> > > return sRet
> > > End Function
> > >
> > > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean = False
> > > Dim adSalesOrder As SalesOrderAdapter = New
> > > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.
> > > Ro
> > > ws
> > > DataSet)
> > > adSalesOrder.BOConnect()
> > > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> > > AND OpenLine = True"
> > > Dim MorePages As Boolean
> > > opts.NamedSearch.WhereClauses.Clear()
> > > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > > WriteToLogFile(whereClause)
> > > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > > Orders Lines found(" &
> > > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " &
> > > sPartNum) WriteToLogFile("Open Sales Orders Lines found(" &
> > > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > > &
> > > chkQualityHold.Checked)
> > > IF(chkQualityHold.Checked = True) Then
> > > '/**************************************/
> > >
> > > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > For Each dr AS DataRow In
> > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > > dr.Item("CheckBox01") = chkQualityHold.Checked
> > > dr.Item("RowMod") = "U"
> > > bDirty = True
> > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > > be
> > > updated.")
> > > Next
> > > End If
> > > '/**************************************/
> > > sMessage = sPartNum & " is placed on Quality HOLD."
> > > Else'IF(chkQualityHold.Checked = True) Then 'If
> > > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > For Each dr AS DataRow In
> > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > > dr.Item("CheckBox02") = chkQualityHold.Checked
> > > dr.Item("RowMod") = "U"
> > > bDirty = True
> > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > > be
> > > updated.")
> > > Next
> > > End If
> > > sMessage = sPartNum & " is taken off Quality HOLD."
> > > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True)
> > > Then WriteToLogFile("Updating all Sales Orders edited.")
> > > adSalesOrder.Update()
> > > End If
> > > adSalesOrder.Dispose()
> > > 'dsSalesOrder.Dispose()
> > > bQualityHoldChanged = False
> > > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > > Status") End If WriteToLogFile("Closing
> > > UpdateSOFromQualityHoldChange
> > > Function") Catch ex As System.Exception
> > > ExceptionBox.Show(ex)
> > > End Try
> > > End Sub
> > >
> > > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal
> > > Args As
> > > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > > Handling Code Here ** bQualityHoldChanged = NOT
> > > bQualityHoldChanged End Sub
> > >
> > > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal
> > > Args As
> > > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > > Handling Code Here **
> > > UpdateSOFromQualityHoldChange()
> > > End Sub
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
> > must have already linked your email address to a yahoo id to enable access.
> > )
> > (1) To access the Files Section of our Yahoo!Group for Report
> > Builder and Crystal Reports and other 'goodies', please goto:
> > http://groups.yahoo.com/group/vantage/files/.
> > (2) To search through old msg's goto:
> > http://groups.yahoo.com/group/vantage/messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >
> > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > information (including technology and technical data) which is
> > subject
> to the U.S.
> > International Traffic in Arms Regulations (ITAR) or Export
> > Administration Regulations (EAR). This information may not be
> > exported, released, or disclosed to foreign persons either inside or
> > outside the United States without first obtaining the proper U.S.
> > export license or written authorization. In addition, the
> > information and articles described herein are either patented or
> > proprietary, and the copying or reproduction thereof is prohibited
> > without ADVANCED Motion Controls prior written consent. If you are
> > not the intended recipient (or have received this e-mail in error),
> > please notify the sender immediately and destroy this e-mail. Any
> > unauthorized copying, disclosure or distribution of the material in
> > this e-mail is strictly
> forbidden. Thank you for your compliance.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access.
> )
> (1) To access the Files Section of our Yahoo!Group for Report Builder
> and Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> information (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export
> Administration Regulations (EAR). This information may not be
> exported, released, or disclosed to foreign persons either inside or
> outside the United States without first obtaining the proper U.S.
> export license or written authorization. In addition, the information
> and articles described herein are either patented or proprietary, and
> the copying or reproduction thereof is prohibited without ADVANCED
> Motion Controls prior written consent. If you are not the intended
> recipient (or have received this e-mail in error), please notify the
> sender immediately and destroy this e-mail. Any unauthorized copying,
> disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
>
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
Right display the exception for the try catch
On Apr 9, 2013 5:13 PM, "Dan Godfrey" <dgodfrey@...> wrote:

> **
>
>
> How do I capture an error if it does not throw an error? I ask this
> because there is a try catch around it right now?
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jose Gomez
> Sent: Tuesday, April 09, 2013 1:55 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> ok so it is not successful use a Try Catch and get the error. adn see what
> t is.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> On Tue, Apr 9, 2013 at 4:46 PM, Dan Godfrey <dgodfrey@...> wrote:
>
> > **
> >
> >
> > The update function returned false
> >
> >
> > Dan Godfrey
> > (805) 389-1935 x 251
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > Behalf Of Jose Gomez
> > Sent: Tuesday, April 09, 2013 12:46 PM
> > To: Vantage
> > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
> >
> > does your adapter return true?
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez>
> > <http://www.facebook.com/josegomez
> > >
> > <http://www.google.com/profiles/jose.gomez>
> > <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> > On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:
> >
> > > **
> >
> > >
> > >
> > > I don't get an error. My records just don't get updated one way and
> > > the other just has no data.
> > >
> > > Dan Godfrey
> > > (805) 389-1935 x 251
> > >
> > >
> > > -----Original Message-----
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > > Behalf Of Jose Gomez
> > > Sent: Tuesday, April 09, 2013 12:34 PM
> > > To: Vantage
> > > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update
> > > function
> > >
> > > What error do you get?
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@...
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez>
> > > <http://www.facebook.com/josegomez
> > > >
> > > <http://www.google.com/profiles/jose.gomez>
> > > <http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > > On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...>
> wrote:
> > >
> > > > **
> > >
> > > >
> > > >
> > > > Has anyone ever use the Sales Order Adapter in customization? I am
> > > > not looking to added a line or release. I just want to edit
> > > > current SO
> > lines?
> > > > for whatever reason I can not get the update to work.
> > > >
> > > > Here is my code:
> > > >
> > > > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > > > String) As String Dim sRet AS String = String.Empty Dim edvPart As
> > > > EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > > > EpiDataView)
> > > > If(edvPart.Row > -1) Then
> > > > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet
> > > > .G
> > > > et
> > > > Type()))
> > > > Then
> > > > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > > > End If
> > > > End If
> > > > return sRet
> > > > End Function
> > > >
> > > > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > > > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > > > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > > > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > > > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > > > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean = False
> > > > Dim adSalesOrder As SalesOrderAdapter = New
> > > > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > > > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.
> > > > Ro
> > > > ws
> > > > DataSet)
> > > > adSalesOrder.BOConnect()
> > > > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum &
> "'
> > > > AND OpenLine = True"
> > > > Dim MorePages As Boolean
> > > > opts.NamedSearch.WhereClauses.Clear()
> > > > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > > > WriteToLogFile(whereClause)
> > > > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > > > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > > > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > > > Orders Lines found(" &
> > > > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " &
> > > > sPartNum) WriteToLogFile("Open Sales Orders Lines found(" &
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > > > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > > > &
> > > > chkQualityHold.Checked)
> > > > IF(chkQualityHold.Checked = True) Then
> > > > '/**************************************/
> > > >
> > > > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > > > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > > For Each dr AS DataRow In
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > > > dr.Item("CheckBox01") = chkQualityHold.Checked
> > > > dr.Item("RowMod") = "U"
> > > > bDirty = True
> > > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > > > be
> > > > updated.")
> > > > Next
> > > > End If
> > > > '/**************************************/
> > > > sMessage = sPartNum & " is placed on Quality HOLD."
> > > > Else'IF(chkQualityHold.Checked = True) Then 'If
> > > > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For
> > > > Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > > For Each dr AS DataRow In
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > > > dr.Item("CheckBox02") = chkQualityHold.Checked
> > > > dr.Item("RowMod") = "U"
> > > > bDirty = True
> > > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should
> > > > be
> > > > updated.")
> > > > Next
> > > > End If
> > > > sMessage = sPartNum & " is taken off Quality HOLD."
> > > > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True)
> > > > Then WriteToLogFile("Updating all Sales Orders edited.")
> > > > adSalesOrder.Update()
> > > > End If
> > > > adSalesOrder.Dispose()
> > > > 'dsSalesOrder.Dispose()
> > > > bQualityHoldChanged = False
> > > > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > > > Status") End If WriteToLogFile("Closing
> > > > UpdateSOFromQualityHoldChange
> > > > Function") Catch ex As System.Exception
> > > > ExceptionBox.Show(ex)
> > > > End Try
> > > > End Sub
> > > >
> > > > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal
> > > > Args As
> > > > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > > > Handling Code Here ** bQualityHoldChanged = NOT
> > > > bQualityHoldChanged End Sub
> > > >
> > > > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal
> > > > Args As
> > > > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > > > Handling Code Here **
> > > > UpdateSOFromQualityHoldChange()
> > > > End Sub
> > > >
> > > >
> > > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > ------------------------------------
> > >
> > >
> > > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
> > > must have already linked your email address to a yahoo id to enable
> access.
> > > )
> > > (1) To access the Files Section of our Yahoo!Group for Report
> > > Builder and Crystal Reports and other 'goodies', please goto:
> > > http://groups.yahoo.com/group/vantage/files/.
> > > (2) To search through old msg's goto:
> > > http://groups.yahoo.com/group/vantage/messages
> > > (3) To view links to Vendors that provide Vantage services goto:
> > > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> > >
> > > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > > information (including technology and technical data) which is
> > > subject
> > to the U.S.
> > > International Traffic in Arms Regulations (ITAR) or Export
> > > Administration Regulations (EAR). This information may not be
> > > exported, released, or disclosed to foreign persons either inside or
> > > outside the United States without first obtaining the proper U.S.
> > > export license or written authorization. In addition, the
> > > information and articles described herein are either patented or
> > > proprietary, and the copying or reproduction thereof is prohibited
> > > without ADVANCED Motion Controls prior written consent. If you are
> > > not the intended recipient (or have received this e-mail in error),
> > > please notify the sender immediately and destroy this e-mail. Any
> > > unauthorized copying, disclosure or distribution of the material in
> > > this e-mail is strictly
> > forbidden. Thank you for your compliance.
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> > have already linked your email address to a yahoo id to enable access.
> > )
> > (1) To access the Files Section of our Yahoo!Group for Report Builder
> > and Crystal Reports and other 'goodies', please goto:
> > http://groups.yahoo.com/group/vantage/files/.
> > (2) To search through old msg's goto:
> > http://groups.yahoo.com/group/vantage/messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >
> > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > information (including technology and technical data) which is subject
> to the U.S.
> > International Traffic in Arms Regulations (ITAR) or Export
> > Administration Regulations (EAR). This information may not be
> > exported, released, or disclosed to foreign persons either inside or
> > outside the United States without first obtaining the proper U.S.
> > export license or written authorization. In addition, the information
> > and articles described herein are either patented or proprietary, and
> > the copying or reproduction thereof is prohibited without ADVANCED
> > Motion Controls prior written consent. If you are not the intended
> > recipient (or have received this e-mail in error), please notify the
> > sender immediately and destroy this e-mail. Any unauthorized copying,
> > disclosure or distribution of the material in this e-mail is strictly
> forbidden. Thank you for your compliance.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information
> (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export Administration
> Regulations (EAR). This information may not be exported, released, or
> disclosed to foreign persons either inside or outside the United States
> without first obtaining the proper U.S. export license or written
> authorization. In addition, the information and articles described herein
> are either patented or proprietary, and the copying or reproduction thereof
> is prohibited without ADVANCED Motion Controls prior written consent. If
> you are not the intended recipient (or have received this e-mail in error),
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden. Thank you for your compliance.
>
>


[Non-text portions of this message have been removed]
Jose,
I really appreciate your help. I am confused with what you just said. Can you give a quick code example, even if in psuedocode?


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Tuesday, April 09, 2013 2:22 PM
To: Vantage
Subject: RE: [Vantage] Vantage 8x: SalesOrder Adapter Update function

Right display the exception for the try catch On Apr 9, 2013 5:13 PM, "Dan Godfrey" <dgodfrey@...> wrote:

> **
>
>
> How do I capture an error if it does not throw an error? I ask this
> because there is a try catch around it right now?
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Jose Gomez
> Sent: Tuesday, April 09, 2013 1:55 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> ok so it is not successful use a Try Catch and get the error. adn see
> what t is.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>
> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez>
> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> On Tue, Apr 9, 2013 at 4:46 PM, Dan Godfrey <dgodfrey@...> wrote:
>
> > **
> >
> >
> > The update function returned false
> >
> >
> > Dan Godfrey
> > (805) 389-1935 x 251
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > Behalf Of Jose Gomez
> > Sent: Tuesday, April 09, 2013 12:46 PM
> > To: Vantage
> > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update
> > function
> >
> > does your adapter return true?
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez>
> > <http://www.facebook.com/josegomez
> > >
> > <http://www.google.com/profiles/jose.gomez>
> > <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> > On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:
> >
> > > **
> >
> > >
> > >
> > > I don't get an error. My records just don't get updated one way
> > > and the other just has no data.
> > >
> > > Dan Godfrey
> > > (805) 389-1935 x 251
> > >
> > >
> > > -----Original Message-----
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > > Behalf Of Jose Gomez
> > > Sent: Tuesday, April 09, 2013 12:34 PM
> > > To: Vantage
> > > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update
> > > function
> > >
> > > What error do you get?
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@...
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez>
> > > <http://www.facebook.com/josegomez
> > > >
> > > <http://www.google.com/profiles/jose.gomez>
> > > <http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > > On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...>
> wrote:
> > >
> > > > **
> > >
> > > >
> > > >
> > > > Has anyone ever use the Sales Order Adapter in customization? I
> > > > am not looking to added a line or release. I just want to edit
> > > > current SO
> > lines?
> > > > for whatever reason I can not get the update to work.
> > > >
> > > > Here is my code:
> > > >
> > > > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > > > String) As String Dim sRet AS String = String.Empty Dim edvPart
> > > > As EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > > > EpiDataView)
> > > > If(edvPart.Row > -1) Then
> > > > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sR
> > > > et
> > > > .G
> > > > et
> > > > Type()))
> > > > Then
> > > > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > > > End If
> > > > End If
> > > > return sRet
> > > > End Function
> > > >
> > > > Private Sub UpdateSOFromQualityHoldChange()
> > > > WriteToLogFile("Inside
> > > > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > > > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > > > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > > > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > > > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean =
> > > > False Dim adSalesOrder As SalesOrderAdapter = New
> > > > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > > > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.
> > > > Ro
> > > > ws
> > > > DataSet)
> > > > adSalesOrder.BOConnect()
> > > > Dim whereClause As String = "whereClause: PartNum = '" &
> > > > sPartNum &
> "'
> > > > AND OpenLine = True"
> > > > Dim MorePages As Boolean
> > > > opts.NamedSearch.WhereClauses.Clear()
> > > > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder =
> > > > True")
> > > > WriteToLogFile(whereClause)
> > > > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > > > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > > > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open
> > > > Sales Orders Lines found(" &
> > > > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " &
> > > > sPartNum) WriteToLogFile("Open Sales Orders Lines found(" &
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > > > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > > > &
> > > > chkQualityHold.Checked)
> > > > IF(chkQualityHold.Checked = True) Then
> > > > '/**************************************/
> > > >
> > > > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> > > > 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > > For Each dr AS DataRow In
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > > > dr.Item("CheckBox01") = chkQualityHold.Checked
> > > > dr.Item("RowMod") = "U"
> > > > bDirty = True
> > > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & "
> > > > should be
> > > > updated.")
> > > > Next
> > > > End If
> > > > '/**************************************/
> > > > sMessage = sPartNum & " is placed on Quality HOLD."
> > > > Else'IF(chkQualityHold.Checked = True) Then 'If
> > > > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> > > > 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > > For Each dr AS DataRow In
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > > > dr.Item("CheckBox02") = chkQualityHold.Checked
> > > > dr.Item("RowMod") = "U"
> > > > bDirty = True
> > > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & "
> > > > should be
> > > > updated.")
> > > > Next
> > > > End If
> > > > sMessage = sPartNum & " is taken off Quality HOLD."
> > > > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True)
> > > > Then WriteToLogFile("Updating all Sales Orders edited.")
> > > > adSalesOrder.Update()
> > > > End If
> > > > adSalesOrder.Dispose()
> > > > 'dsSalesOrder.Dispose()
> > > > bQualityHoldChanged = False
> > > > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > > > Status") End If WriteToLogFile("Closing
> > > > UpdateSOFromQualityHoldChange
> > > > Function") Catch ex As System.Exception
> > > > ExceptionBox.Show(ex)
> > > > End Try
> > > > End Sub
> > > >
> > > > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal
> > > > Args As
> > > > System.EventArgs) Handles chkQualityHold.Click '// ** Place
> > > > Event Handling Code Here ** bQualityHoldChanged = NOT
> > > > bQualityHoldChanged End Sub
> > > >
> > > > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal
> > > > Args As
> > > > System.EventArgs) Handles btnQualityHold.Click '// ** Place
> > > > Event Handling Code Here **
> > > > UpdateSOFromQualityHoldChange()
> > > > End Sub
> > > >
> > > >
> > > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > ------------------------------------
> > >
> > >
> > > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
> > > must have already linked your email address to a yahoo id to
> > > enable
> access.
> > > )
> > > (1) To access the Files Section of our Yahoo!Group for Report
> > > Builder and Crystal Reports and other 'goodies', please goto:
> > > http://groups.yahoo.com/group/vantage/files/.
> > > (2) To search through old msg's goto:
> > > http://groups.yahoo.com/group/vantage/messages
> > > (3) To view links to Vendors that provide Vantage services goto:
> > > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> > >
> > > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > > information (including technology and technical data) which is
> > > subject
> > to the U.S.
> > > International Traffic in Arms Regulations (ITAR) or Export
> > > Administration Regulations (EAR). This information may not be
> > > exported, released, or disclosed to foreign persons either inside
> > > or outside the United States without first obtaining the proper U.S.
> > > export license or written authorization. In addition, the
> > > information and articles described herein are either patented or
> > > proprietary, and the copying or reproduction thereof is prohibited
> > > without ADVANCED Motion Controls prior written consent. If you are
> > > not the intended recipient (or have received this e-mail in
> > > error), please notify the sender immediately and destroy this
> > > e-mail. Any unauthorized copying, disclosure or distribution of
> > > the material in this e-mail is strictly
> > forbidden. Thank you for your compliance.
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
> > must have already linked your email address to a yahoo id to enable access.
> > )
> > (1) To access the Files Section of our Yahoo!Group for Report
> > Builder and Crystal Reports and other 'goodies', please goto:
> > http://groups.yahoo.com/group/vantage/files/.
> > (2) To search through old msg's goto:
> > http://groups.yahoo.com/group/vantage/messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >
> > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > information (including technology and technical data) which is
> > subject
> to the U.S.
> > International Traffic in Arms Regulations (ITAR) or Export
> > Administration Regulations (EAR). This information may not be
> > exported, released, or disclosed to foreign persons either inside or
> > outside the United States without first obtaining the proper U.S.
> > export license or written authorization. In addition, the
> > information and articles described herein are either patented or
> > proprietary, and the copying or reproduction thereof is prohibited
> > without ADVANCED Motion Controls prior written consent. If you are
> > not the intended recipient (or have received this e-mail in error),
> > please notify the sender immediately and destroy this e-mail. Any
> > unauthorized copying, disclosure or distribution of the material in
> > this e-mail is strictly
> forbidden. Thank you for your compliance.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access.
> )
> (1) To access the Files Section of our Yahoo!Group for Report Builder
> and Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> information (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export
> Administration Regulations (EAR). This information may not be
> exported, released, or disclosed to foreign persons either inside or
> outside the United States without first obtaining the proper U.S.
> export license or written authorization. In addition, the information
> and articles described herein are either patented or proprietary, and
> the copying or reproduction thereof is prohibited without ADVANCED
> Motion Controls prior written consent. If you are not the intended
> recipient (or have received this e-mail in error), please notify the
> sender immediately and destroy this e-mail. Any unauthorized copying,
> disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
Jose,
I really appreciate your help. I am confused with what you just said. Can you give a quick code example, even if in psuedocode?


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Tuesday, April 09, 2013 2:22 PM
To: Vantage
Subject: RE: [Vantage] Vantage 8x: SalesOrder Adapter Update function

Right display the exception for the try catch On Apr 9, 2013 5:13 PM, "Dan Godfrey" <dgodfrey@...> wrote:

> **
>
>
> How do I capture an error if it does not throw an error? I ask this
> because there is a try catch around it right now?
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Jose Gomez
> Sent: Tuesday, April 09, 2013 1:55 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> ok so it is not successful use a Try Catch and get the error. adn see
> what t is.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>
> <http://www.facebook.com/josegomez
> >
> <http://www.google.com/profiles/jose.gomez>
> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> On Tue, Apr 9, 2013 at 4:46 PM, Dan Godfrey <dgodfrey@...> wrote:
>
> > **
> >
> >
> > The update function returned false
> >
> >
> > Dan Godfrey
> > (805) 389-1935 x 251
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > Behalf Of Jose Gomez
> > Sent: Tuesday, April 09, 2013 12:46 PM
> > To: Vantage
> > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update
> > function
> >
> > does your adapter return true?
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez>
> > <http://www.facebook.com/josegomez
> > >
> > <http://www.google.com/profiles/jose.gomez>
> > <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> > On Tue, Apr 9, 2013 at 3:43 PM, Dan Godfrey <dgodfrey@...> wrote:
> >
> > > **
> >
> > >
> > >
> > > I don't get an error. My records just don't get updated one way
> > > and the other just has no data.
> > >
> > > Dan Godfrey
> > > (805) 389-1935 x 251
> > >
> > >
> > > -----Original Message-----
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > > Behalf Of Jose Gomez
> > > Sent: Tuesday, April 09, 2013 12:34 PM
> > > To: Vantage
> > > Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update
> > > function
> > >
> > > What error do you get?
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@...
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez>
> > > <http://www.facebook.com/josegomez
> > > >
> > > <http://www.google.com/profiles/jose.gomez>
> > > <http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > > On Tue, Apr 9, 2013 at 3:30 PM, dgodfrey_amc <dgodfrey@...>
> wrote:
> > >
> > > > **
> > >
> > > >
> > > >
> > > > Has anyone ever use the Sales Order Adapter in customization? I
> > > > am not looking to added a line or release. I just want to edit
> > > > current SO
> > lines?
> > > > for whatever reason I can not get the update to work.
> > > >
> > > > Here is my code:
> > > >
> > > > Private Function GetStringFromPartDataView(ByVal ColumnName AS
> > > > String) As String Dim sRet AS String = String.Empty Dim edvPart
> > > > As EpiDataView = CType(oTrans.EpiDataViews("Part"),
> > > > EpiDataView)
> > > > If(edvPart.Row > -1) Then
> > > > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sR
> > > > et
> > > > .G
> > > > et
> > > > Type()))
> > > > Then
> > > > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > > > End If
> > > > End If
> > > > return sRet
> > > > End Function
> > > >
> > > > Private Sub UpdateSOFromQualityHoldChange()
> > > > WriteToLogFile("Inside
> > > > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > > > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > > > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > > > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > > > IF (bQualityHoldChanged = True) Then Dim bDirty AS Boolean =
> > > > False Dim adSalesOrder As SalesOrderAdapter = New
> > > > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > > > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.
> > > > Ro
> > > > ws
> > > > DataSet)
> > > > adSalesOrder.BOConnect()
> > > > Dim whereClause As String = "whereClause: PartNum = '" &
> > > > sPartNum &
> "'
> > > > AND OpenLine = True"
> > > > Dim MorePages As Boolean
> > > > opts.NamedSearch.WhereClauses.Clear()
> > > > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder =
> > > > True")
> > > > WriteToLogFile(whereClause)
> > > > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > > > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > > > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open
> > > > Sales Orders Lines found(" &
> > > > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " &
> > > > sPartNum) WriteToLogFile("Open Sales Orders Lines found(" &
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > > > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: "
> > > > &
> > > > chkQualityHold.Checked)
> > > > IF(chkQualityHold.Checked = True) Then
> > > > '/**************************************/
> > > >
> > > > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> > > > 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > > For Each dr AS DataRow In
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > > > dr.Item("CheckBox01") = chkQualityHold.Checked
> > > > dr.Item("RowMod") = "U"
> > > > bDirty = True
> > > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & "
> > > > should be
> > > > updated.")
> > > > Next
> > > > End If
> > > > '/**************************************/
> > > > sMessage = sPartNum & " is placed on Quality HOLD."
> > > > Else'IF(chkQualityHold.Checked = True) Then 'If
> > > > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > > > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> > > > 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > > > For Each dr AS DataRow In
> > > > adSalesOrder.SalesOrderData.OrderDtl.Rows
> > > > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > > > dr.Item("CheckBox02") = chkQualityHold.Checked
> > > > dr.Item("RowMod") = "U"
> > > > bDirty = True
> > > > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & "
> > > > should be
> > > > updated.")
> > > > Next
> > > > End If
> > > > sMessage = sPartNum & " is taken off Quality HOLD."
> > > > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True)
> > > > Then WriteToLogFile("Updating all Sales Orders edited.")
> > > > adSalesOrder.Update()
> > > > End If
> > > > adSalesOrder.Dispose()
> > > > 'dsSalesOrder.Dispose()
> > > > bQualityHoldChanged = False
> > > > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > > > Status") End If WriteToLogFile("Closing
> > > > UpdateSOFromQualityHoldChange
> > > > Function") Catch ex As System.Exception
> > > > ExceptionBox.Show(ex)
> > > > End Try
> > > > End Sub
> > > >
> > > > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal
> > > > Args As
> > > > System.EventArgs) Handles chkQualityHold.Click '// ** Place
> > > > Event Handling Code Here ** bQualityHoldChanged = NOT
> > > > bQualityHoldChanged End Sub
> > > >
> > > > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal
> > > > Args As
> > > > System.EventArgs) Handles btnQualityHold.Click '// ** Place
> > > > Event Handling Code Here **
> > > > UpdateSOFromQualityHoldChange()
> > > > End Sub
> > > >
> > > >
> > > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > ------------------------------------
> > >
> > >
> > > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
> > > must have already linked your email address to a yahoo id to
> > > enable
> access.
> > > )
> > > (1) To access the Files Section of our Yahoo!Group for Report
> > > Builder and Crystal Reports and other 'goodies', please goto:
> > > http://groups.yahoo.com/group/vantage/files/.
> > > (2) To search through old msg's goto:
> > > http://groups.yahoo.com/group/vantage/messages
> > > (3) To view links to Vendors that provide Vantage services goto:
> > > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> > >
> > > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > > information (including technology and technical data) which is
> > > subject
> > to the U.S.
> > > International Traffic in Arms Regulations (ITAR) or Export
> > > Administration Regulations (EAR). This information may not be
> > > exported, released, or disclosed to foreign persons either inside
> > > or outside the United States without first obtaining the proper U.S.
> > > export license or written authorization. In addition, the
> > > information and articles described herein are either patented or
> > > proprietary, and the copying or reproduction thereof is prohibited
> > > without ADVANCED Motion Controls prior written consent. If you are
> > > not the intended recipient (or have received this e-mail in
> > > error), please notify the sender immediately and destroy this
> > > e-mail. Any unauthorized copying, disclosure or distribution of
> > > the material in this e-mail is strictly
> > forbidden. Thank you for your compliance.
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
> > must have already linked your email address to a yahoo id to enable access.
> > )
> > (1) To access the Files Section of our Yahoo!Group for Report
> > Builder and Crystal Reports and other 'goodies', please goto:
> > http://groups.yahoo.com/group/vantage/files/.
> > (2) To search through old msg's goto:
> > http://groups.yahoo.com/group/vantage/messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >
> > CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> > information (including technology and technical data) which is
> > subject
> to the U.S.
> > International Traffic in Arms Regulations (ITAR) or Export
> > Administration Regulations (EAR). This information may not be
> > exported, released, or disclosed to foreign persons either inside or
> > outside the United States without first obtaining the proper U.S.
> > export license or written authorization. In addition, the
> > information and articles described herein are either patented or
> > proprietary, and the copying or reproduction thereof is prohibited
> > without ADVANCED Motion Controls prior written consent. If you are
> > not the intended recipient (or have received this e-mail in error),
> > please notify the sender immediately and destroy this e-mail. Any
> > unauthorized copying, disclosure or distribution of the material in
> > this e-mail is strictly
> forbidden. Thank you for your compliance.
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access.
> )
> (1) To access the Files Section of our Yahoo!Group for Report Builder
> and Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain
> information (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export
> Administration Regulations (EAR). This information may not be
> exported, released, or disclosed to foreign persons either inside or
> outside the United States without first obtaining the proper U.S.
> export license or written authorization. In addition, the information
> and articles described herein are either patented or proprietary, and
> the copying or reproduction thereof is prohibited without ADVANCED
> Motion Controls prior written consent. If you are not the intended
> recipient (or have received this e-mail in error), please notify the
> sender immediately and destroy this e-mail. Any unauthorized copying,
> disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
So I am bumping this to hopefully see if anyone can see what is wrong with my code?

I am in Vantage 8x inside a Part Maintenance customization. My code compiles; I just get a false return from the SalesOrderAdapter's Update method. So I can not get the update to work.

If anyone has any code, in a customization, using the SalesOrderAdapter's Update Method specifically, I would great appreciate you posting how you use the method.

I have called Epicor support for a code snippet or explanation on how to utilize the method to no avail. Below is what I current have in my customization.



Private Sub UpdateSOFromQualityHoldChange()
Try
Dim sMessage AS String = ""
Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
WriteToLogFile("Inside UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " & chkQualityHold.Checked & "; bQualityHoldChanged = " & bQualityHoldChanged)
IF (bQualityHoldChanged = True) Then
Dim bDirty AS Boolean = False
Dim adSalesOrder As SalesOrderAdapter = New SalesOrderAdapter(PartForm)
Dim dsSalesOrder AS Data.DataSet
adSalesOrder.BOConnect()
IF(adSalesOrder.IsBOEnabled = False) Then
MyMessageBox("adSalesOrder.IsBOEnabled = " & adSalesOrder.IsBOEnabled, bDeveloperLoggedIn, MsgBoxStyle.OKOnly, "Debugging Message")
Exit Sub
End If
Dim whereClause As String = "PartNum = '" & sPartNum & "' AND OpenLine = True"
Dim MorePages As Boolean
opts.NamedSearch.WhereClauses.Clear()

opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = true")
opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)

If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
IF(dr.Item("CheckBox02") <> chkQualityHold.Checked) Then
dr.Item("CheckBox02") = chkQualityHold.Checked
dr.Item("CurrencySwitch") = False
dr.Item("RowMod") = "U"
bDirty = True
WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & ", SOLine#: " & dr.Item("OrderLine").ToString() &", SO_QAHold: " & dr.Item("CheckBox02").ToString() & " should be updated.")
End If
Next
End If

IF(chkQualityHold.Checked = True) Then
sMessage = sPartNum & " is placed on Quality HOLD."
Else'IF(chkQualityHold.Checked = False) Then
sMessage = sPartNum & " is taken off Quality HOLD."
End IF'IF(chkQualityHold.Checked = True) Then
'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold Status")

IF(bDirty = True) Then
WriteToLogFile("Updating all Sales Orders edited.")
Dim bTest AS Boolean = adSalesOrder.Update()
WriteToLogFile("Update returned = " & bTest)
End If

adSalesOrder.Dispose()
dsSalesOrder.Dispose()
bQualityHoldChanged = False

WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function")
End If
CATCH Ex AS Exception
WriteToLogFile(Ex.Message)
ExceptionBox.Show(Ex)
End Try
End Sub

Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles chkQualityHold.Click
'// ** Place Event Handling Code Here **
bQualityHoldChanged = NOT bQualityHoldChanged
End Sub

Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnQualityHold.Click
'// ** Place Event Handling Code Here **
UpdateSOFromQualityHoldChange()
End Sub
Do you have bpm on updates?
On Apr 18, 2013 5:55 PM, "dgodfrey_amc" <dgodfrey@...> wrote:

> **
>
>
> So I am bumping this to hopefully see if anyone can see what is wrong with
> my code?
>
> I am in Vantage 8x inside a Part Maintenance customization. My code
> compiles; I just get a false return from the SalesOrderAdapter's Update
> method. So I can not get the update to work.
>
> If anyone has any code, in a customization, using the SalesOrderAdapter's
> Update Method specifically, I would great appreciate you posting how you
> use the method.
>
> I have called Epicor support for a code snippet or explanation on how to
> utilize the method to no avail. Below is what I current have in my
> customization.
>
> Private Sub UpdateSOFromQualityHoldChange()
> Try
> Dim sMessage AS String = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " & bQualityHoldChanged)
> IF (bQualityHoldChanged = True) Then
> Dim bDirty AS Boolean = False
> Dim adSalesOrder As SalesOrderAdapter = New SalesOrderAdapter(PartForm)
> Dim dsSalesOrder AS Data.DataSet
> adSalesOrder.BOConnect()
> IF(adSalesOrder.IsBOEnabled = False) Then
> MyMessageBox("adSalesOrder.IsBOEnabled = " & adSalesOrder.IsBOEnabled,
> bDeveloperLoggedIn, MsgBoxStyle.OKOnly, "Debugging Message")
> Exit Sub
> End If
> Dim whereClause As String = "PartNum = '" & sPartNum & "' AND OpenLine =
> True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
>
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = true")
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
>
> If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
> For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> IF(dr.Item("CheckBox02") <> chkQualityHold.Checked) Then
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("CurrencySwitch") = False
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & ", SOLine#: " &
> dr.Item("OrderLine").ToString() &", SO_QAHold: " &
> dr.Item("CheckBox02").ToString() & " should be updated.")
> End If
> Next
> End If
>
> IF(chkQualityHold.Checked = True) Then
> sMessage = sPartNum & " is placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = False) Then
> sMessage = sPartNum & " is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold Status")
>
> IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.")
> Dim bTest AS Boolean = adSalesOrder.Update()
> WriteToLogFile("Update returned = " & bTest)
> End If
>
> adSalesOrder.Dispose()
> dsSalesOrder.Dispose()
> bQualityHoldChanged = False
>
> WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function")
> End If
> CATCH Ex AS Exception
> WriteToLogFile(Ex.Message)
> ExceptionBox.Show(Ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click
> '// ** Place Event Handling Code Here **
> bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click
> '// ** Place Event Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


[Non-text portions of this message have been removed]
The BPM that I have on the Update method is the alternative to the customization option. Current I have the two options separated by the fact that I have a TEST button for me to activate the UpdateSOFromQualityHoldChange routine. I have not place UpdateSOFromQualityHoldChange routine into the Update method code in the customization. So both options are isolated from each other.


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Thursday, April 18, 2013 3:51 PM
To: Vantage
Subject: Re: [Vantage] Re: Vantage 8x: SalesOrder Adapter Update function

Do you have bpm on updates?
On Apr 18, 2013 5:55 PM, "dgodfrey_amc" <dgodfrey@...> wrote:

> **
>
>
> So I am bumping this to hopefully see if anyone can see what is wrong
> with my code?
>
> I am in Vantage 8x inside a Part Maintenance customization. My code
> compiles; I just get a false return from the SalesOrderAdapter's
> Update method. So I can not get the update to work.
>
> If anyone has any code, in a customization, using the
> SalesOrderAdapter's Update Method specifically, I would great
> appreciate you posting how you use the method.
>
> I have called Epicor support for a code snippet or explanation on how
> to utilize the method to no avail. Below is what I current have in my
> customization.
>
> Private Sub UpdateSOFromQualityHoldChange() Try Dim sMessage AS String
> = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " &
> bQualityHoldChanged) IF (bQualityHoldChanged = True) Then Dim bDirty
> AS Boolean = False Dim adSalesOrder As SalesOrderAdapter = New
> SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet
> adSalesOrder.BOConnect()
> IF(adSalesOrder.IsBOEnabled = False) Then
> MyMessageBox("adSalesOrder.IsBOEnabled = " & adSalesOrder.IsBOEnabled,
> bDeveloperLoggedIn, MsgBoxStyle.OKOnly, "Debugging Message") Exit Sub
> End If Dim whereClause As String = "PartNum = '" & sPartNum & "' AND
> OpenLine = True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
>
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = true")
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
>
> If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then For Each dr
> AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> IF(dr.Item("CheckBox02") <> chkQualityHold.Checked) Then
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("CurrencySwitch") = False
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & ", SOLine#:
> " &
> dr.Item("OrderLine").ToString() &", SO_QAHold: " &
> dr.Item("CheckBox02").ToString() & " should be updated.") End If Next
> End If
>
> IF(chkQualityHold.Checked = True) Then sMessage = sPartNum & " is
> placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = False) Then sMessage = sPartNum & "
> is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> Status")
>
> IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.") Dim bTest AS
> Boolean = adSalesOrder.Update() WriteToLogFile("Update returned = " &
> bTest) End If
>
> adSalesOrder.Dispose()
> dsSalesOrder.Dispose()
> bQualityHoldChanged = False
>
> WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function") End
> If CATCH Ex AS Exception
> WriteToLogFile(Ex.Message)
> ExceptionBox.Show(Ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
I don't know if you meant if there was any BPMs on the SalesOrder .Update method or the Part.Update (Part Maintenance is the form that I am customizing).

I checked and I do have BPMs on the SalesOrder update method, but checking the BPMs they are not conflicting with what I am doing. Meaning that they are not getting triggered by the Part.Update BPM using the UpdateTableBuffer on OrderDtl table.


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Dan Godfrey
Sent: Thursday, April 18, 2013 4:02 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Vantage 8x: SalesOrder Adapter Update function

The BPM that I have on the Update method is the alternative to the customization option. Current I have the two options separated by the fact that I have a TEST button for me to activate the UpdateSOFromQualityHoldChange routine. I have not place UpdateSOFromQualityHoldChange routine into the Update method code in the customization. So both options are isolated from each other.


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Thursday, April 18, 2013 3:51 PM
To: Vantage
Subject: Re: [Vantage] Re: Vantage 8x: SalesOrder Adapter Update function

Do you have bpm on updates?
On Apr 18, 2013 5:55 PM, "dgodfrey_amc" <dgodfrey@...> wrote:

> **
>
>
> So I am bumping this to hopefully see if anyone can see what is wrong
> with my code?
>
> I am in Vantage 8x inside a Part Maintenance customization. My code
> compiles; I just get a false return from the SalesOrderAdapter's
> Update method. So I can not get the update to work.
>
> If anyone has any code, in a customization, using the
> SalesOrderAdapter's Update Method specifically, I would great
> appreciate you posting how you use the method.
>
> I have called Epicor support for a code snippet or explanation on how
> to utilize the method to no avail. Below is what I current have in my
> customization.
>
> Private Sub UpdateSOFromQualityHoldChange() Try Dim sMessage AS String
> = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " &
> bQualityHoldChanged) IF (bQualityHoldChanged = True) Then Dim bDirty
> AS Boolean = False Dim adSalesOrder As SalesOrderAdapter = New
> SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet
> adSalesOrder.BOConnect()
> IF(adSalesOrder.IsBOEnabled = False) Then
> MyMessageBox("adSalesOrder.IsBOEnabled = " & adSalesOrder.IsBOEnabled,
> bDeveloperLoggedIn, MsgBoxStyle.OKOnly, "Debugging Message") Exit Sub
> End If Dim whereClause As String = "PartNum = '" & sPartNum & "' AND
> OpenLine = True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
>
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = true")
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
>
> If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then For Each dr
> AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> IF(dr.Item("CheckBox02") <> chkQualityHold.Checked) Then
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("CurrencySwitch") = False
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & ", SOLine#:
> " &
> dr.Item("OrderLine").ToString() &", SO_QAHold: " &
> dr.Item("CheckBox02").ToString() & " should be updated.") End If Next
> End If
>
> IF(chkQualityHold.Checked = True) Then sMessage = sPartNum & " is
> placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = False) Then sMessage = sPartNum & "
> is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> Status")
>
> IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.") Dim bTest AS
> Boolean = adSalesOrder.Update() WriteToLogFile("Update returned = " &
> bTest) End If
>
> adSalesOrder.Dispose()
> dsSalesOrder.Dispose()
> bQualityHoldChanged = False
>
> WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function") End
> If CATCH Ex AS Exception
> WriteToLogFile(Ex.Message)
> ExceptionBox.Show(Ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.


------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
So just for testing try doing a blank customization calling get by I'd and
changing one field and calling updates. If that works we can narrow it down
to your code vs a different system bpm or data problem
On Apr 9, 2013 3:30 PM, "dgodfrey_amc" <dgodfrey@...> wrote:

> **
>
>
> Has anyone ever use the Sales Order Adapter in customization? I am not
> looking to added a line or release. I just want to edit current SO lines?
> for whatever reason I can not get the update to work.
>
> Here is my code:
>
> Private Function GetStringFromPartDataView(ByVal ColumnName AS String) As
> String
> Dim sRet AS String = String.Empty
> Dim edvPart As EpiDataView = CType(oTrans.EpiDataViews("Part"),
> EpiDataView)
> If(edvPart.Row > -1) Then
> IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.GetType()))
> Then
> sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> End If
> End If
> return sRet
> End Function
>
> Private Sub UpdateSOFromQualityHoldChange()
> WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " & bQualityHoldChanged)
> Try
> Dim sMessage AS String = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> IF (bQualityHoldChanged = True) Then
> Dim bDirty AS Boolean = False
> Dim adSalesOrder As SalesOrderAdapter = New SalesOrderAdapter(PartForm)
> Dim dsSalesOrder AS Data.DataSet' =
> adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.RowsDataSet)
> adSalesOrder.BOConnect()
> Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "' AND
> OpenLine = True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> WriteToLogFile(whereClause)
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> adSalesOrder.GetRows(opts, MorePages)
> 'WriteToLogFile("Open Sales Orders Lines found(" &
> adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> WriteToLogFile("Open Sales Orders Lines found(" &
> adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " & sPartNum)
> WriteToLogFile("Setting the Sales Order Hold Status to: " &
> chkQualityHold.Checked)
> IF(chkQualityHold.Checked = True) Then
> '/**************************************/
>
> 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
> If (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox02") = dr.Item("CheckBox01")
> dr.Item("CheckBox01") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> '/**************************************/
> sMessage = sPartNum & " is placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = True) Then
> 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then
> If (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then
> 'For Each dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox01") = dr.Item("CheckBox02")
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> sMessage = sPartNum & " is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then
> IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.")
> adSalesOrder.Update()
> End If
> adSalesOrder.Dispose()
> 'dsSalesOrder.Dispose()
> bQualityHoldChanged = False
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold Status")
> End If
> WriteToLogFile("Closing UpdateSOFromQualityHoldChange Function")
> Catch ex As System.Exception
> ExceptionBox.Show(ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click
> '// ** Place Event Handling Code Here **
> bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click
> '// ** Place Event Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


[Non-text portions of this message have been removed]
Let me see if I can clarify more. Since I can only activate the special code from the TEST button, I can save the form with CheckBox05 changed and not call my code and EVERYTHING is happy. I definitely know it is my code.

Now, with the function the only problem is that the SalesOrderAdpater just won't update the appropriate OrderDtl records. When my function is called I log my steps.
- I have identified that I get the appropriate rows in the SalesOrderAdapter.
- I do get to the point of calling the SalesOrderAdpater.Update method.
- The update method returns false and then the code moves on happy and closes the function normally.
There are no errors to report.

So I think that there is something that I am missing like how to re-apply the dataset to the adapter before calling the update method or something like that. The problem is that I have found that the SalesOrderAdapter.SalesOrderData dataset is readonly is Vantage 8x. So trying to assign the dataset that I get from GetRows back to the SalesOrderAdapter.SalesOrderData dataset I get an error ("Property 'SalesOrderData' is 'ReadOnly'."). So I don't know how to alter the datasest in the adapter so that it will update anything.


Dan Godfrey
(805) 389-1935 x 251

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Thursday, April 18, 2013 4:19 PM
To: Vantage
Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function

So just for testing try doing a blank customization calling get by I'd and changing one field and calling updates. If that works we can narrow it down to your code vs a different system bpm or data problem On Apr 9, 2013 3:30 PM, "dgodfrey_amc" <dgodfrey@...> wrote:

> **
>
>
> Has anyone ever use the Sales Order Adapter in customization? I am not
> looking to added a line or release. I just want to edit current SO lines?
> for whatever reason I can not get the update to work.
>
> Here is my code:
>
> Private Function GetStringFromPartDataView(ByVal ColumnName AS String)
> As String Dim sRet AS String = String.Empty Dim edvPart As EpiDataView
> = CType(oTrans.EpiDataViews("Part"),
> EpiDataView)
> If(edvPart.Row > -1) Then
> IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.Get
> Type()))
> Then
> sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> End If
> End If
> return sRet
> End Function
>
> Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> chkQualityHold.Checked & "; bQualityHoldChanged = " &
> bQualityHoldChanged) Try Dim sMessage AS String = ""
> Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> IF (bQualityHoldChanged = True) Then
> Dim bDirty AS Boolean = False
> Dim adSalesOrder As SalesOrderAdapter = New
> SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Rows
> DataSet)
> adSalesOrder.BOConnect()
> Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> AND OpenLine = True"
> Dim MorePages As Boolean
> opts.NamedSearch.WhereClauses.Clear()
> opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> WriteToLogFile(whereClause)
> opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> Orders Lines found(" &
> adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> WriteToLogFile("Open Sales Orders Lines found(" &
> adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: " &
> chkQualityHold.Checked)
> IF(chkQualityHold.Checked = True) Then
> '/**************************************/
>
> 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox02") = dr.Item("CheckBox01")
> dr.Item("CheckBox01") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> '/**************************************/
> sMessage = sPartNum & " is placed on Quality HOLD."
> Else'IF(chkQualityHold.Checked = True) Then 'If
> (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> dr.Item("CheckBox01") = dr.Item("CheckBox02")
> dr.Item("CheckBox02") = chkQualityHold.Checked
> dr.Item("RowMod") = "U"
> bDirty = True
> WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> updated.")
> Next
> End If
> sMessage = sPartNum & " is taken off Quality HOLD."
> End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> WriteToLogFile("Updating all Sales Orders edited.")
> adSalesOrder.Update()
> End If
> adSalesOrder.Dispose()
> 'dsSalesOrder.Dispose()
> bQualityHoldChanged = False
> 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> Status") End If WriteToLogFile("Closing UpdateSOFromQualityHoldChange
> Function") Catch ex As System.Exception
> ExceptionBox.Show(ex)
> End Try
> End Sub
>
> Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> End Sub
>
> Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> Handling Code Here **
> UpdateSOFromQualityHoldChange()
> End Sub
>
>
>


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



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information (including technology and technical data) which is subject to the U.S. International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR). This information may not be exported, released, or disclosed to foreign persons either inside or outside the United States without first obtaining the proper U.S. export license or written authorization. In addition, the information and articles described herein are either patented or proprietary, and the copying or reproduction thereof is prohibited without ADVANCED Motion Controls prior written consent. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you for your compliance.
Just so that I am clear you are not in the sales order screen correct?
On Apr 18, 2013 7:48 PM, "Dan Godfrey" <dgodfrey@...> wrote:

> **
>
>
> Let me see if I can clarify more. Since I can only activate the special
> code from the TEST button, I can save the form with CheckBox05 changed and
> not call my code and EVERYTHING is happy. I definitely know it is my code.
>
> Now, with the function the only problem is that the SalesOrderAdpater just
> won't update the appropriate OrderDtl records. When my function is called I
> log my steps.
> - I have identified that I get the appropriate rows in the
> SalesOrderAdapter.
> - I do get to the point of calling the SalesOrderAdpater.Update method.
> - The update method returns false and then the code moves on happy and
> closes the function normally.
> There are no errors to report.
>
> So I think that there is something that I am missing like how to re-apply
> the dataset to the adapter before calling the update method or something
> like that. The problem is that I have found that the
> SalesOrderAdapter.SalesOrderData dataset is readonly is Vantage 8x. So
> trying to assign the dataset that I get from GetRows back to the
> SalesOrderAdapter.SalesOrderData dataset I get an error ("Property
> 'SalesOrderData' is 'ReadOnly'."). So I don't know how to alter the
> datasest in the adapter so that it will update anything.
>
> Dan Godfrey
> (805) 389-1935 x 251
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jose Gomez
> Sent: Thursday, April 18, 2013 4:19 PM
> To: Vantage
> Subject: Re: [Vantage] Vantage 8x: SalesOrder Adapter Update function
>
> So just for testing try doing a blank customization calling get by I'd and
> changing one field and calling updates. If that works we can narrow it down
> to your code vs a different system bpm or data problem On Apr 9, 2013 3:30
> PM, "dgodfrey_amc" <dgodfrey@...> wrote:
>
> > **
> >
> >
> > Has anyone ever use the Sales Order Adapter in customization? I am not
> > looking to added a line or release. I just want to edit current SO lines?
> > for whatever reason I can not get the update to work.
> >
> > Here is my code:
> >
> > Private Function GetStringFromPartDataView(ByVal ColumnName AS String)
> > As String Dim sRet AS String = String.Empty Dim edvPart As EpiDataView
> > = CType(oTrans.EpiDataViews("Part"),
> > EpiDataView)
> > If(edvPart.Row > -1) Then
> > IF(edvPart.dataView(edvPart.Row)(ColumnName).GetType().Equals(sRet.Get
> > Type()))
> > Then
> > sRet = edvPart.dataView(edvPart.Row)(ColumnName)
> > End If
> > End If
> > return sRet
> > End Function
> >
> > Private Sub UpdateSOFromQualityHoldChange() WriteToLogFile("Inside
> > UpdateSOFromQualityHoldChange::chkQualityHold.Checked = " &
> > chkQualityHold.Checked & "; bQualityHoldChanged = " &
> > bQualityHoldChanged) Try Dim sMessage AS String = ""
> > Dim sPartNum AS String = GetStringFromPartDataView("PartNum")
> > IF (bQualityHoldChanged = True) Then
> > Dim bDirty AS Boolean = False
> > Dim adSalesOrder As SalesOrderAdapter = New
> > SalesOrderAdapter(PartForm) Dim dsSalesOrder AS Data.DataSet' =
> > adSalesOrder.GetCurrentDataSet(Epicor.Mfg.UI.Searches.DataSetMode.Rows
> > DataSet)
> > adSalesOrder.BOConnect()
> > Dim whereClause As String = "whereClause: PartNum = '" & sPartNum & "'
> > AND OpenLine = True"
> > Dim MorePages As Boolean
> > opts.NamedSearch.WhereClauses.Clear()
> > opts.NamedSearch.WhereClauses.Add("OrderHed", "OpenOrder = True")
> > WriteToLogFile(whereClause)
> > opts.NamedSearch.WhereClauses.Add("OrderDtl", whereClause)
> > 'dsSalesOrder = adSalesOrder.GetRows(opts, MorePages)
> > adSalesOrder.GetRows(opts, MorePages) 'WriteToLogFile("Open Sales
> > Orders Lines found(" &
> > adSalesOrder.Tables("OrderDtl").Rows.Count() & ") for: " & sPartNum)
> > WriteToLogFile("Open Sales Orders Lines found(" &
> > adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() & ") for: " &
> > sPartNum) WriteToLogFile("Setting the Sales Order Hold Status to: " &
> > chkQualityHold.Checked)
> > IF(chkQualityHold.Checked = True) Then
> > '/**************************************/
> >
> > 'If (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> > dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox02") = dr.Item("CheckBox01")
> > dr.Item("CheckBox01") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> > updated.")
> > Next
> > End If
> > '/**************************************/
> > sMessage = sPartNum & " is placed on Quality HOLD."
> > Else'IF(chkQualityHold.Checked = True) Then 'If
> > (dsSalesOrder.Tables("OrderDtl").Rows.Count() > 0) Then If
> > (adSalesOrder.SalesOrderData.OrderDtl.Rows.Count() > 0) Then 'For Each
> > dr AS DataRow In dsSalesOrder.Tables("OrderDtl").Rows
> > For Each dr AS DataRow In adSalesOrder.SalesOrderData.OrderDtl.Rows
> > dr.Item("CheckBox01") = dr.Item("CheckBox02")
> > dr.Item("CheckBox02") = chkQualityHold.Checked
> > dr.Item("RowMod") = "U"
> > bDirty = True
> > WriteToLogFile("SO#: " & dr.Item("OrderNum").ToString() & " should be
> > updated.")
> > Next
> > End If
> > sMessage = sPartNum & " is taken off Quality HOLD."
> > End IF'IF(chkQualityHold.Checked = True) Then IF(bDirty = True) Then
> > WriteToLogFile("Updating all Sales Orders edited.")
> > adSalesOrder.Update()
> > End If
> > adSalesOrder.Dispose()
> > 'dsSalesOrder.Dispose()
> > bQualityHoldChanged = False
> > 'Emailing(ucbDefaultEmailAddress.Value, sMessage, "Part OnHold
> > Status") End If WriteToLogFile("Closing UpdateSOFromQualityHoldChange
> > Function") Catch ex As System.Exception
> > ExceptionBox.Show(ex)
> > End Try
> > End Sub
> >
> > Private Sub chkQualityHold_Click(ByVal Sender As Object, ByVal Args As
> > System.EventArgs) Handles chkQualityHold.Click '// ** Place Event
> > Handling Code Here ** bQualityHoldChanged = NOT bQualityHoldChanged
> > End Sub
> >
> > Private Sub btnQualityHold_Click(ByVal Sender As Object, ByVal Args As
> > System.EventArgs) Handles btnQualityHold.Click '// ** Place Event
> > Handling Code Here **
> > UpdateSOFromQualityHoldChange()
> > End Sub
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> CONFIDENTIALITY NOTICE: The data attached/enclosed may contain information
> (including technology and technical data) which is subject to the U.S.
> International Traffic in Arms Regulations (ITAR) or Export Administration
> Regulations (EAR). This information may not be exported, released, or
> disclosed to foreign persons either inside or outside the United States
> without first obtaining the proper U.S. export license or written
> authorization. In addition, the information and articles described herein
> are either patented or proprietary, and the copying or reproduction thereof
> is prohibited without ADVANCED Motion Controls prior written consent. If
> you are not the intended recipient (or have received this e-mail in error),
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden. Thank you for your compliance.
>
>


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