You can also control whether or not your sub is called by setting a condition on your row position, I wouldn't worry about that...
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-4832
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of millermw7
Sent: Monday, April 29, 2013 12:25 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: 8.03.404B customization code help
Sure did! Sorry it's been a few days, projects & priorities get shuffled.
So I added the code to EpiViewNotification & it certainly works!
Problem now is finding the right event/trigger & I haven't had any luck. I noticed when this is working it popped the messagebox twice, once in the GetRMANum() method & again from btnDMRNum_Click()
I guess my question is how can I get the btnDMRNum_Click() to fire off GetRMANum() ???
right now I have:
Private Sub btnDMRNum_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnDMRNum.Click
'// ** Place Event Handling Code Here **
GetRMANum()
End Sub
This button's GUID is ada53cf7-2322-4b45-84f4-81ffe5e52ad8 but unsure how that ties in here. Ideally if I can just get the btnDMRNum_Click to handle GetRMANum() then should be golden.
I'm hesitant to keep trying other methods/triggers because on form load the index is -1 and will cause an error & break my entire customization.
As always, HUGE thanks for the help!
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-4832
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of millermw7
Sent: Monday, April 29, 2013 12:25 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: 8.03.404B customization code help
Sure did! Sorry it's been a few days, projects & priorities get shuffled.
So I added the code to EpiViewNotification & it certainly works!
Problem now is finding the right event/trigger & I haven't had any luck. I noticed when this is working it popped the messagebox twice, once in the GetRMANum() method & again from btnDMRNum_Click()
I guess my question is how can I get the btnDMRNum_Click() to fire off GetRMANum() ???
right now I have:
Private Sub btnDMRNum_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnDMRNum.Click
'// ** Place Event Handling Code Here **
GetRMANum()
End Sub
This button's GUID is ada53cf7-2322-4b45-84f4-81ffe5e52ad8 but unsure how that ties in here. Ideally if I can just get the btnDMRNum_Click to handle GetRMANum() then should be golden.
I'm hesitant to keep trying other methods/triggers because on form load the index is -1 and will cause an error & break my entire customization.
As always, HUGE thanks for the help!
--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Rob Bucek <rbucek@...> wrote:
>
> Well that told a story at least! My suggestion, use a fire hose event like epiviewnotification, something that you know will trigger (even if its not the one you want). That way at least you know your core functionality is good, then you can bang away at finding that trigger..setup message boxes to show you what events are firing as you step through your process in that form. What you trace and what is visible through the customization layer can be very different things.
>
>
>
> Rob Bucek
> Production Control Manager
> PH: (715) 284-5376 ext 311
> Mobile: (715)896-4832
> FAX: (715)284-4084
> [cid:1.234354861@...]<http://www.dsmfg.com/>
> (Click the logo to view our site)<http://www.dsmfg.com/>
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of millermw7
> Sent: Thursday, April 18, 2013 2:53 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: 8.03.404B customization code help
>
>
>
> yeah, caught me... I'm testing this customization in our dev environment & was repurposing that field just until I get this working. I'm normally very against reusing things like this.
>
> Anyway, I can't get a messagebox to display. Put one in the GetRMANum() method & the btnDMRNum_Click method & never got it working. So apparently the issue for now is that for some reason neither method is actually being called.
>
> Again, many thanks for your assistance on this, Rob!
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, Rob Bucek <rbucek@> wrote:
> >
> > Why are you trying to stuff an RMA number into the DMRHead.OperSeq? I'd avoid repurposing base fields like that, too often you get tangled up with the business logic. In either event, verify whether or not it's actually returning the data you expect by dropping in a message box. Rem out the following for testing:
> >
> > // edvDMRHead.dataView(edvDMRHead.Row)("OprSeq") = dsNonConf.Tables(0).Rows(0)("RMANum")
> >
> > Put in
> >
> > Messagebox.show = (dsNonConf.Tables(0).Rows(0)("RMANum"))
> >
> > If it barks at you about not being a string, just recast it.
> >
> >
> >
> > Rob Bucek
> > Production Control Manager
> > PH: (715) 284-5376 ext 311
> > Mobile: (715)896-4832
> > FAX: (715)284-4084
> > [cid:1.234354861@]<http://www.dsmfg.com/>
> > (Click the logo to view our site)<http://www.dsmfg.com/>
> >
> > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of millermw7
> > Sent: Thursday, April 18, 2013 1:39 PM
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Re: 8.03.404B customization code help
> >
> >
> >
> > Thanks yet again, Rob!
> >
> > I think I'm painfully close, yet something is still off. No warnings or code errors in the customization, but now the custom RMA field on the form isn't returning the RMANum. I have the custom field mapped to the DMRHead field OprSeq.
> >
> > I imported the AD/BO/IF for NonCon. Ran a database query checking the DMRHead.OprSeq value to see if it at least updated in the database & it didn't. Feel like I'm really close here though.
> >
> > Here is everything I have in the Script Editor...
> >
> > '//**************************************************
> > '// Custom VB.NET code for DMRProcessingForm
> > '// Created: 3/18/2013 11:35:59 AM
> > '//**************************************************
> > Imports System
> > Imports System.Data
> > Imports System.Diagnostics
> > Imports System.Windows.Forms
> > Imports System.ComponentModel
> > Imports Microsoft.VisualBasic
> > 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 **
> >
> > '// End Wizard Added Module Level Variables **
> >
> > '// Add Custom Module Level Variables Here **
> > Private WithEvents edvDmrHead As EpiDataView
> > Private WithEvents oTrans_adapter As EpiBaseAdapter
> > Private WithEvents btnDMRNum As EpiButton
> >
> > Sub InitializeCustomCode()
> >
> > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> > '// Begin Wizard Added Variable Intialization
> > edvDMRHead = CType(oTrans.EpiDataViews("DMRHead"), EpiDataView)
> > 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
> > edvDmrHead = nothing
> > oTrans_adapter = Nothing
> > '// End Wizard Added Object Disposal
> > '// Begin Custom Code Disposal
> >
> > '// End Custom Code Disposal
> > End Sub
> >
> > Private Sub GetRMANum()
> > Dim edvDMRHead As EpiDataView = CType(oTrans.EpiDataViews("DMRHead"), EpiDataView)
> > Dim intDMR As String = edvDMRHead.dataView(edvDMRHead.Row)("DMRNum")
> > intDMR.tostring()
> > Dim recSelected As Boolean
> > Dim whereClause As String = "DMRNum = '" & intDMR & "'"
> > Dim dsNonConf As DataSet = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "NonConfAdapter", recSelected, False, whereClause)
> > If (recSelected) Then
> > edvDMRHead.dataView(edvDMRHead.Row)("OprSeq") = dsNonConf.Tables(0).Rows(0)("RMANum")
> > End If
> > End Sub
> >
> > Private Sub btnDMRNum_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnDMRNum.Click
> > '// ** Place Event Handling Code Here **
> > GetRMANum()
> > End Sub
> >
> > End Module
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, Rob Bucek <rbucek@> wrote:
> > >
> > > Try creating a bogus button, using control wizard, choose click for the event, paste code into script editor, then change stuff to represent the other button (i.e. name, GUID, etc)... put your sub name into that click event, that should work.
> > >
> > > Rob Bucek
> > > Production Control Manager
> > > PH: (715) 284-5376 ext 311
> > > Mobile: (715)896-4832
> > > FAX: (715)284-4084
> > > [cid:1.234354861@]<http://www.dsmfg.com/>
> > > (Click the logo to view our site)<http://www.dsmfg.com/>
> > >
> > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of millermw7
> > > Sent: Thursday, April 18, 2013 11:12 AM
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
> > > Subject: [Vantage] Re: 8.03.404B customization code help
> > >
> > >
> > >
> > > No worries, I already caught that.
> > >
> > > But I do have another question in getting this to work...
> > >
> > > Ideally I'd like to have the YourSubName() method fire off on the btnDMRNum click event. That button is native to the form & isn't custom. I ran a trace & see that this button is calling PartIsActive() & GetDMRHistory(), but not quite sure how to add the YourSubName() method to what this button does.
> > >
> > > Can't even find where this button is an option via the Event Wizard.
> > >
> > > HUGE thanks again for the help! VERY informative and I think I'm really starting to get how coding customizations work.
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, Rob Bucek <rbucek@> wrote:
> > > >
> > > > Oops... amend the last row in the sub to the following
> > > >
> > > > edvDMRActnReject.dataView(edvDMRActnReject.Row) ("Number01") = dsNonConf.Tables(0).Rows(0)("RMANum")
> > > >
> > > > Rob Bucek
> > > > Production Control Manager
> > > > PH: (715) 284-5376 ext 311
> > > > Mobile: (715)896-4832
> > > > FAX: (715)284-4084
> > > > [cid:1.234354861@]<http://www.dsmfg.com/>
> > > > (Click the logo to view our site)<http://www.dsmfg.com/>
> > > >
> > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of Rob Bucek
> > > > Sent: Thursday, April 18, 2013 8:37 AM
> > > > To: 'vantage@yahoogroups.com<mailto:%26%2339%3Bvantage%40yahoogroups.com><mailto:%26%2339%3Bvantage%40yahoogroups.com><mailto:%26%2339%3Bvantage%40yahoogroups.com><mailto:%26%2339%3Bvantage%40yahoogroups.com>'
> > > > Subject: RE: [Vantage] 8.03.404B customization code help
> > > >
> > > >
> > > >
> > > > When do you want this to happen? You'll need to determine what your trigger (form/control event) is. Once you do that here is something that should be pretty close. Keep in mind you'll need to import the AD/BO/IF assemblies for the nonconf BO. The sample below assumes a specific dataview, if this isn't yours, change it accordingly. So if you are storing the data in the DMR Header you would use as an example: Dim edvDMRHead As EpiDataView = CType(oTrans.EpiDataViews("DMRHead"), EpiDataView) instead of the reject as shown below. This should get you started..
> > > >
> > > > Public Class Script
> > > >
> > > > Private WithEvents edvDmrActnReject As EpiDataView
> > > > Private WithEvents oTrans_adapter As EpiBaseAdapter
> > > >
> > > > Public Sub InitializeCustomCode()
> > > >
> > > > edvDMRActnReject = CType(oTrans.EpiDataViews("DMRActnReject"), EpiDataView)
> > > > oTrans_adapter = csm.TransAdaptersHT("oTrans_adapter")
> > > >
> > > > Public Sub DestroyCustomCode()
> > > >
> > > > edvDmrActnReject = nothing
> > > > oTrans_adapter = Nothing
> > > >
> > > > Private Sub YourSubName()
> > > >
> > > > Dim edvDMRActnReject As EpiDataView = CType(oTrans.EpiDataViews("DMRActnReject"), EpiDataView)
> > > > Dim intDMR As String = edvDMRActnReject.dataView(edvDMRActnReject.Row)("DMRNum")
> > > > intDMR.tostring()
> > > > Dim recSelected As Boolean
> > > > Dim whereClause As String = "DMRNum = '" & intDMR & "'"
> > > > Dim dsNonConf As DataSet = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "NonConfAdapter", recSelected, False, whereClause)
> > > > If (recSelected) Then
> > > > edvDMRActn.dataView(edvDMRActn.Row)("Number01") = dsNonConf.Tables(0).Rows(0)("RMANum")
> > > >
> > > > End Sub
> > > >
> > > > This code isn't tested but a snippet of something I was doing that was similar..
> > > >
> > > > Rob Bucek
> > > > Production Control Manager
> > > > PH: (715) 284-5376 ext 311
> > > > Mobile: (715)896-4832
> > > > FAX: (715)284-4084
> > > > [cid:1.234354861@<mailto:1.234354861%40web65412.mail.ac4.yahoo.com>]<http://www.dsmfg.com/>
> > > > (Click the logo to view our site)<http://www.dsmfg.com/>
> > > >
> > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of millermw7
> > > > Sent: Thursday, April 18, 2013 8:12 AM
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
> > > > Subject: [Vantage] 8.03.404B customization code help
> > > >
> > > > Hoping someone can help me out here (I'm very new to Vantage).
> > > >
> > > > So I've put a custom field on the DMR Processing form and need to use the DMRNum (held in the nedDMRNum field on the form) to retrieve the RMANum over in the NonConf table. These tables should be linked by the DMRNum field.
> > > >
> > > > Since I'm in an older version with less bells & whistles, I need custom code to do this. However, I'm not having much luck going to the object explorer & copying/pasting the adapter code in the Script Editor. Keeps griping on compile that this or that isn't recognized & I have a hunch it's because my code is wrong.
> > > >
> > > > So I'm not sure how to create a FKV to the NonConf table in the Script Editor, or how to do this. Seems so simple... just need to take the DMRNum, find the record in the NonConf table with that same DMRNum, and pull back the RMANum of that record & put it in a different display field on the same form...
> > > >
> > > > Any help here would be VERY appreciated. Plus once I know how to do this, I think I'll be well on my way to being able to do other customizations.
> > > >
> > > > THANKS!!!
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
> [Non-text portions of this message have been removed]
>
Reply via web post<http://groups.yahoo.com/group/vantage/post;_ylc=X3oDMTJwODdvcjJoBF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRtc2dJZAMxMjAyODYEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMzY3MjU2MzI2?act=reply&messageNum=120286>
Reply to sender <mailto:millermw7@...?subject=Re%3A%208%2E03%2E404B%20customization%20code%20help>
Reply to group <mailto:vantage@yahoogroups.com?subject=Re%3A%208%2E03%2E404B%20customization%20code%20help>
Start a New Topic<http://groups.yahoo.com/group/vantage/post;_ylc=X3oDMTJjY2FyMzUwBF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzEzNjcyNTYzMjY->
Messages in this topic<http://groups.yahoo.com/group/vantage/message/119973;_ylc=X3oDMTM2dm04NGViBF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRtc2dJZAMxMjAyODYEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMzY3MjU2MzI2BHRwY0lkAzExOTk3Mw--> (11)
Recent Activity:
* New Members<http://groups.yahoo.com/group/vantage/members;_ylc=X3oDMTJkaTA2YnA4BF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxMzY3MjU2MzI2?o=6> 6
Visit Your Group<http://groups.yahoo.com/group/vantage;_ylc=X3oDMTJjZXVnOTVnBF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzEzNjcyNTYzMjY->
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/.<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/links
MARKETPLACE
[Non-text portions of this message have been removed]