Because you are defining
Â
Dim edvOrder As EpiDataView = CType(oTrans. EpiDataViews( "Order"),
EpiDataView)
within your after adapter event, you need to destroy the object after setting your checkbox.
Â
Case "GetNewOrder"
Dim edvOrder As EpiDataView = CType(oTrans. EpiDataViews( "Order"),
EpiDataView)
edvOrder.dataView( 0)("SndAlrtShp" ) = true
          edvOrder = Nothing
Â
Case (some other adapter method case)
Â
Frankly, you should probably set edvOrder epiDataView as an object available to the entire module - rather than the just Sub.
Â
Rob Brown
Â
Dim edvOrder As EpiDataView = CType(oTrans. EpiDataViews( "Order"),
EpiDataView)
within your after adapter event, you need to destroy the object after setting your checkbox.
Â
Case "GetNewOrder"
Dim edvOrder As EpiDataView = CType(oTrans. EpiDataViews( "Order"),
EpiDataView)
edvOrder.dataView( 0)("SndAlrtShp" ) = true
          edvOrder = Nothing
Â
Case (some other adapter method case)
Â
Frankly, you should probably set edvOrder epiDataView as an object available to the entire module - rather than the just Sub.
Â
Rob Brown
--- On Tue, 5/20/08, howelllabs <nhutchins@...> wrote:
From: howelllabs <nhutchins@...>
Subject: [Vantage] Re: Customization - Default Values for checkbox
To: vantage@yahoogroups.com
Date: Tuesday, May 20, 2008, 4:06 PM
Hello,
I was trying this code mentioned below to set the "Alert on Shipment"
check box to true by default in Order Entry. I'm using the code below,
when I test the code it passes successfully, but when I try making a new
Order it does not check the check box. Any ideas???
FYI, this is my 1st time customizing a form using the script editor, I
might be doing something wrong......
Thanks in advance!
Norman Hutchins
Network Administrator
Howell Laboratories, Inc.
'//********* ********* ********* ********* ********* *****
'// Custom VB.NET code for PartForm
'// Created: 5/4/2007 5:55:12 AM
'//********* ********* ********* ********* ********* *****
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows. Forms
Imports System.ComponentMod el
Imports Microsoft.VisualBas ic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI. FrameWork
Imports Epicor.Mfg.UI. ExtendedProps
Imports Epicor.Mfg.UI. FormFunctions
Imports Epicor.Mfg.UI. Customization
Imports Epicor.Mfg.UI. Adapters
Imports Epicor.Mfg.UI. Searches
Imports Epicor.Mfg.BO
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added
Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
Private WithEvents oTrans_adapter As EpiBaseAdapter
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
Sub InitializeCustomCod e()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization
oTrans_adapter = csm.TransAdaptersHT ("oTrans_ adapter")
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls
'// End Custom Method Calls
End Sub
Sub DestroyCustomCode( )
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
Object Disposal' lines **
'// Begin Wizard Added Object Disposal
oTrans_adapter = Nothing
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal
'// End Custom Code Disposal
End Sub
Private Sub oTrans_adapter_ AfterAdapterMeth od(ByVal sender As object,
ByVal args As AfterAdapterMethodA rgs) Handles
oTrans_adapter. AfterAdapterMeth od
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
'MessageBox. Show(args. MethodName) ' use this to find method
Select Case args.MethodName
Case "GetNewOrder"
Dim edvOrder As EpiDataView = CType(oTrans. EpiDataViews( "Order"),
EpiDataView)
edvOrder.dataView( 0)("SndAlrtShp" ) = true
Case Else
End Select
End Sub
End Module
--- In vantage@yahoogroups .com, "p51ace99" <p51ace99@.. .> wrote:
>
> Here's are links to the EpicWeb site that might help. I followed the
> instructions for setting the ultracombo default and it worked for
> me. Just add a "Then" to the last If statement (If
> (lastAdapterMethod = "GetNewOrderDtl" ).
>
> ------------ -----
>
> How to set the checkbox to default to true? (Answerbook # 3555ESC)
> https://epicweb. epicor.com/ ReportServer/ Pages/ReportView er.aspx?/ ePort
> al/ABDetail& rs:Command= Render&rc: Toolbar=true& Card_ID=3555ESC& Answerbo
> ok=Vantage%2fVista+ 8.0+-+General+ Information+ documents
>
> How to set the default of an ultracombo? (Answerbook # 3554ESC)
> https://epicweb. epicor.com/ ReportServer/ Pages/ReportView er.aspx?/ ePort
> al/ABDetail& rs:Command= Render&rc: Toolbar=true& Card_ID=3554ESC& Answerbo
> ok=Vantage%2fVista+ 8.0+-+General+ Information+ documents
> --- In vantage@yahoogroups .com, "Babette Welch" bwelch@ wrote:
> >
> >
> > We are preparing Vantage 8 by customizing screens.
> > We have added 'UltroCombo' , textbox, and checkBox.
> > All work well.
> >
> > How do I set the DEFAULT value for a CheckBox?
> > The 'Properties' window has the CONTROL area grayed out.
> >
> > Thanks you for any hints.
> >
> >
> > Babette Welch
> > IT Director
> > bwelch@
> > (906)226-9747 ext: 235
> > ARGONICS, INC.
> > Performance Polyurethanes
[Non-text portions of this message have been removed]