Hi Karen,
I just tested this on my 8.03 Just put this code on Form Load,fcourse
replace "Cust" with whatever string you want to see on the menu and MNU01
with your menu ID
Dim mi As MethodInfo =
GetType(Epicor.Mfg.UI.Menu.Handheld.Transaction).GetMethod("addMenuItem",
(BindingFlags.NonPublic Or BindingFlags.Instance), Nothing, New Type()
{GetType(System.Int32), GetType(System.Int32), GetType(String),
GetType(String)}, Nothing)
mi.Invoke(oTrans, New Object() {0, 5, "Cust", "MNU01"})
*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, May 21, 2013 at 9:01 AM, Karen Schoenung <
kschoenung@...> wrote:
I just tested this on my 8.03 Just put this code on Form Load,fcourse
replace "Cust" with whatever string you want to see on the menu and MNU01
with your menu ID
Dim mi As MethodInfo =
GetType(Epicor.Mfg.UI.Menu.Handheld.Transaction).GetMethod("addMenuItem",
(BindingFlags.NonPublic Or BindingFlags.Instance), Nothing, New Type()
{GetType(System.Int32), GetType(System.Int32), GetType(String),
GetType(String)}, Nothing)
mi.Invoke(oTrans, New Object() {0, 5, "Cust", "MNU01"})
*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, May 21, 2013 at 9:01 AM, Karen Schoenung <
kschoenung@...> wrote:
> **[Non-text portions of this message have been removed]
>
>
> Yes, 8.03.409C (SQL)
>
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jose Gomez
> Sent: Monday, May 20, 2013 6:18 PM
> To: Vantage
> Subject: RE: [Vantage] HH - add menu item to lstMenuItems
>
> what version? 8?
> On May 20, 2013 5:25 PM, "Karen Schoenung" <kschoenung@...>
> wrote:
>
> > **
>
> >
> >
> > Hi Jose,
> >
> > Below is the converted code which compiles successfully - but then
> > throws the error shown when trying to use the customization (so far
> > doing this in the full Epicor, Handheld menu, customizing the form
> > load screen that has the first 5 menu items listed...Any ideas?
> >
> > Thanks,
> > Karen
> >
> > Private Sub HHMenuForm_Load(ByVal sender As object, ByVal args As
> > EventArgs) Handles HHMenuForm.Load
> > '//
> > '// Add Event Handler Code
> > '//
> > Dim mi As MethodInfo =
> > GetType(Epicor.Mfg.UI.Menu.Handheld.Transaction).GetMethod("addMenuIte
> > m", BindingFlags.NonPublic Or BindingFlags.Instance, Nothing, New
> > Type() {GetType(Integer), GetType(Integer), GetType([String]),
> > GetType([String])},
> > Nothing)
> > mi.Invoke(oTrans, New Object() {0, 5, "Cust", "HHMN1010"})
> > '//LoadMenuItems()
> > Dim ExampleFormClass As Object
> > '//Dim ExampleFormClass As New HHMenuForm
> >
> > If True Then
> > ExampleFormClass.addMenuItem(0, 0,
> > EpiString.GetString("menuInquiries"),
> > "MENU01")
> > ExampleFormClass.addMenuItem(0, 1, EpiString.GetString("menuLabor"),
> > "MENU02")
> > ExampleFormClass.addMenuItem(0, 2,
> > EpiString.GetString("menuMaterial"),
> > "MENU03")
> > ExampleFormClass.addMenuItem(0, 3, EpiString.GetString("menuShipRcv"),
> > "MENU04")
> > ExampleFormClass.addMenuItem(0, 4,
> > EpiString.GetString("menuProduction"),
> > "MENU06")
> > ExampleFormClass.addMenuItem(1, 0,
> > EpiString.GetString("menuBinTracker"),
> > "HHMN1001")
> > ExampleFormClass.addMenuItem(1, 1,
> > EpiString.GetString("menuLotTracker"),
> > "HHMN1002")
> > ExampleFormClass.addMenuItem(1, 2,
> > EpiString.GetString("menuPartTracker"),
> > "HHMN1003")
> > ExampleFormClass.addMenuItem(1, 3,
> > EpiString.GetString("menuSerialTracker"), "HHMN1004")
> > ExampleFormClass.addMenuItem(1, 4,
> > EpiString.GetString("menuTransLog"),
> > "HHMN1005")
> > ExampleFormClass.addMenuItem(2, 0, EpiString.GetString("menuClockIn"),
> > "HHMN3001")
> > ExampleFormClass.addMenuItem(2, 1,
> > EpiString.GetString("menuStartIndirect"), "HHMN3002")
> > ExampleFormClass.addMenuItem(2, 2,
> > EpiString.GetString("menuStartProduction"), "HHMN3003", "P")
> > ExampleFormClass.addMenuItem(2, 3,
> > EpiString.GetString("menuStartSetup"),
> > "HHMN3004", "P")
> > ExampleFormClass.addMenuItem(2, 4,
> > EpiString.GetString("menuStartRework"),
> > "HHMN3005", "P")
> > ExampleFormClass.addMenuItem(2, 5,
> > EpiString.GetString("menuWorkQueue"),
> > "HHMN3006")
> > ExampleFormClass.addMenuItem(3, 0, EpiString.GetString("menuInbound"),
> > "MENU07")
> > ExampleFormClass.addMenuItem(3, 1,
> > EpiString.GetString("menuInventory"),
> > "MENU08")
> > ExampleFormClass.addMenuItem(3, 2,
> > EpiString.GetString("menuOutbound"),
> > "MENU09")
> > ExampleFormClass.addMenuItem(3, 3,
> > EpiString.GetString("menuMaterialQueueEdit"), "HHMN2001", "M")
> > ExampleFormClass.addMenuItem(3, 4,
> > EpiString.GetString("menuMaterialQueue"), "HHMN2002", "M")
> > ExampleFormClass.addMenuItem(3, 5,
> > EpiString.GetString("menuMaterialIDQueue"), "HHMN2019", "M")
> > ExampleFormClass.addMenuItem(3, 6,
> > EpiString.GetString("menuAutoSelectTrans"), "HHMN2020", "M")
> > ExampleFormClass.addMenuItem(3, 7,
> > EpiString.GetString("menuUOMSplitMerge"), "HHMN2013", "M")
> > ExampleFormClass.addMenuItem(4, 0, EpiString.GetString("menuInbound"),
> > "MENU10")
> > ExampleFormClass.addMenuItem(4, 1,
> > EpiString.GetString("menuOutbound"),
> > "MENU11")
> > ExampleFormClass.addMenuItem(6, 0,
> > EpiString.GetString("menuKanbanReceipts"), "HHMN6001", "P")
> > ExampleFormClass.addMenuItem(7, 0,
> > EpiString.GetString("menuJobReceiptToInv"), "HHMN2003", "M")
> > ExampleFormClass.addMenuItem(7, 1,
> > EpiString.GetString("menuJobReceiptToJob"), "HHMN2004", "M")
> > ExampleFormClass.addMenuItem(7, 2,
> > EpiString.GetString("menuJobReceiptToSalvage"), "HHMN2005", "M")
> > ExampleFormClass.addMenuItem(7, 3,
> > EpiString.GetString("menuReturnAssembly"), "HHMN2006", "M")
> > ExampleFormClass.addMenuItem(7, 4,
> > EpiString.GetString("menuReturnMaterial"), "HHMN2007", "M")
> > ExampleFormClass.addMenuItem(8, 0,
> > EpiString.GetString("menuAdjustInventory"), "HHMN2008", "M")
> > ExampleFormClass.addMenuItem(8, 1,
> > EpiString.GetString("menuCountEntry"),
> > "HHMN2009", "M")
> > ExampleFormClass.addMenuItem(8, 2,
> > EpiString.GetString("menuMoveInventory"), "HHMN2010", "M")
> > ExampleFormClass.addMenuItem(8, 3,
> > EpiString.GetString("menuUnpickSalesOrder"), "HHMN2040", "M")
> > ExampleFormClass.addMenuItem(8, 4,
> > EpiString.GetString("menuUnpickTransOrder"), "HHMN2041", "M")
> > ExampleFormClass.addMenuItem(9, 0,
> > EpiString.GetString("menuIssueAssembly"), "HHMN2011", "M")
> > ExampleFormClass.addMenuItem(9, 1,
> > EpiString.GetString("menuIssueMaterial"), "HHMN2012", "M")
> > ExampleFormClass.addMenuItem(10, 0,
> > EpiString.GetString("menuContainerArrival"), "HHMN4020", "R")
> > ExampleFormClass.addMenuItem(10, 1,
> > EpiString.GetString("menuContainerReceipts"), "HHMN4021", "R")
> > ExampleFormClass.addMenuItem(10, 2,
> > EpiString.GetString("menuICReceipts"),
> > "HHMN4007", "R")
> > ExampleFormClass.addMenuItem(10, 3,
> > EpiString.GetString("menuPOReceipts"),
> > "HHMN4001", "R")
> > ExampleFormClass.addMenuItem(10, 4,
> > EpiString.GetString("menuTOReceipts"),
> > "HHMN4005", "R")
> > ExampleFormClass.addMenuItem(11, 0,
> > EpiString.GetString("menuConfirmShipExampleFormClassnts"), "HHMN4002",
> > "R") ExampleFormClass.addMenuItem(11, 1,
> > EpiString.GetString("menuMasterpack"),
> > "HHMN4010", "R")
> > ExampleFormClass.addMenuItem(11, 2,
> > EpiString.GetString("menuMiscShipment"), "HHMN4009", "R")
> > ExampleFormClass.addMenuItem(11, 3,
> > EpiString.GetString("menuSubcontractShipment"), "HHMN4008", "R")
> > ExampleFormClass.addMenuItem(11, 4,
> > EpiString.GetString("menuCustomerMassShip"), "HHMN4004", "R")
> > ExampleFormClass.addMenuItem(11, 5,
> > EpiString.GetString("menuPickedOrders"), "HHMN4003", "R")
> > ExampleFormClass.addMenuItem(11, 6,
> > EpiString.GetString("menuTOShipment"),
> > "HHMN4006", "R")
> > ExampleFormClass.addMenuItem(11, 7,
> > EpiString.GetString("menuPackout"),
> > "HHMN4011", "R")
> > End If
> >
> > End Sub
> >
> > Error Detail
> > ============
> > Exception has been thrown by the target of an invocation.
> >
> > Stack Trace
> > ===========
> > at System.RuntimeMethodHandle._InvokeMethodFast(Object target,
> > Object[] arguments, SignatureStruct& sig, MethodAttributes
> > methodAttributes, RuntimeTypeHandle typeOwner) at
> > System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
> > arguments, Signature sig, MethodAttributes methodAttributes,
> > RuntimeTypeHandle typeOwner) at
> > System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> > invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
> > Boolean skipVisibilityChecks) at
> > System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> > invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
> > at
> > Epicor.Mfg.UI.Customization.CustomScriptManager.OnCustomCodeFormLoad(O
> > bject
> > sender, EventArgs e)
> >
> > Inner Exception
> > ===============
> > Object variable or With block variable not set.
> >
> > Inner Stack Trace
> > =================
> > at
> > Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object
> > Instance)
> > at
> > Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> > IgnoreReturn)
> > at Script.HHMenuForm_Load(Object sender, EventArgs args)
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> > Behalf Of Jose Gomez
> > Sent: Monday, May 20, 2013 10:53 AM
> > To: Vantage
> > Subject: Re: [Vantage] HH - add menu item to lstMenuItems
> >
> > Hi Karen
> > You have to put it in the Customization for the Main Form for the hand
> > Held Screen. You can do it on Form Load or Initialize. Letme know if
> > you have any other questions.
> >
> > *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 Mon, May 20, 2013 at 11:50 AM, Karen Schoenung <
> > kschoenung@...> wrote:
> >
> > > **
> > >
> > >
> > > Hi,
> > > I searched and found Jose's post about using reflection to add a
> > > menu item
> > > - but I am not sure where to put the code. Would this be put in the
> > > first form that opens with menu items listed? Do I need to put this
> > > in the script editor? Of course some changes would be needed to
> > > convert to vb and Vantage 8.03.409c...Any additional information
> > > someone can provide? I thought it would be pretty easy to add a menu
> > > item to
> > handhelds, but I guess not...
> > >
> > > Here is the code Jose had for another message posted (to add Sales
> > > Order Pick List):
> > >
> > > using System.Reflection
> > >
> > > MethodInfo mi =
> > >
> > > typeof(Epicor.Mfg.UI.Menu.Handheld.Transaction).GetMethod("addMenuIt
> > > em
> > > ",BindingF\
> > > lags.NonPublic
> > > | BindingFlags.Instance, null, new
> > > Type[]{typeof(int),typeof(int),typeof(String),typeof(String)},null);
> > > mi.Invoke(oTrans,new object[]{0,5,"Cust","HHMN1010"});
> > >
> > > Where 0 and 5 are the indexes of where you'd like to put the menu
> > > based off the currently available menus' below (9.05.607B) this list
> > > will be different based on your version and patch level, since our
> > > beloeved Epicor decided that using a regular menu system they
> > > already had built was out of the question and they simply hard coded
> as shown.
> > >
> > > public void LoadMenuItems()
> > > {
> > > this.addMenuItem(0, 0, EpiString.GetString("menuInquiries"),
> > > "MENU01"); this.addMenuItem(0, 1, EpiString.GetString("menuLabor"),
> > > "MENU02"); this.addMenuItem(0, 2,
> > > EpiString.GetString("menuMaterial"),
> > > "MENU03"); this.addMenuItem(0, 3,
> > > EpiString.GetString("menuShipRcv"),
> > > "MENU04"); this.addMenuItem(0, 4,
> > > EpiString.GetString("menuProduction"), "MENU06");
> > > this.addMenuItem(1, 0, EpiString.GetString("menuBinTracker"),
> > > "HHMN1001"); this.addMenuItem(1, 1,
> > > EpiString.GetString("menuLotTracker"),
> > > "HHMN1002"); this.addMenuItem(1, 2,
> > > EpiString.GetString("menuPartTracker"), "HHMN1003");
> > > this.addMenuItem(1, 3, EpiString.GetString("menuSerialTracker"),
> > > "HHMN1004");
> > > this.addMenuItem(1, 4, EpiString.GetString("menuTransLog"),
> > > "HHMN1005"); this.addMenuItem(2, 0,
> > > EpiString.GetString("menuClockIn"), "HHMN3001"); this.addMenuItem(2,
> > > 1, EpiString.GetString("menuStartIndirect"),
> > > "HHMN3002");
> > > this.addMenuItem(2, 2, EpiString.GetString("menuStartProduction"),
> > > "HHMN3003", "P");
> > > this.addMenuItem(2, 3, EpiString.GetString("menuStartSetup"),
> > > "HHMN3004", "P");
> > > this.addMenuItem(2, 4, EpiString.GetString("menuStartRework"),
> > > "HHMN3005", "P");
> > > this.addMenuItem(2, 5, EpiString.GetString("menuWorkQueue"),
> > > "HHMN3006"); this.addMenuItem(3, 0,
> > > EpiString.GetString("menuInbound"), "MENU07"); this.addMenuItem(3,
> > > 1, EpiString.GetString("menuInventory"), "MENU08");
> > > this.addMenuItem(3, 2, EpiString.GetString("menuOutbound"),
> > > "MENU09"); this.addMenuItem(3, 3,
> > > EpiString.GetString("menuMaterialQueueEdit"), "HHMN2001", "M");
> > > this.addMenuItem(3, 4, EpiString.GetString("menuMaterialQueue"),
> > > "HHMN2002", "M");
> > > this.addMenuItem(3, 5, EpiString.GetString("menuMaterialIDQueue"),
> > > "HHMN2019", "M");
> > > this.addMenuItem(3, 6, EpiString.GetString("menuAutoSelectTrans"),
> > > "HHMN2020", "M");
> > > this.addMenuItem(3, 7, EpiString.GetString("menuUOMSplitMerge"),
> > > "HHMN2013", "M");
> > > this.addMenuItem(4, 0, EpiString.GetString("menuInbound"),
> > > "MENU10"); this.addMenuItem(4, 1,
> > > EpiString.GetString("menuOutbound"), "MENU11"); this.addMenuItem(6,
> > > 0, EpiString.GetString("menuKanbanReceipts"),
> > > "HHMN6001", "P");
> > > this.addMenuItem(7, 0, EpiString.GetString("menuJobReceiptToInv"),
> > > "HHMN2003", "M");
> > > this.addMenuItem(7, 1, EpiString.GetString("menuJobReceiptToJob"),
> > > "HHMN2004", "M");
> > > this.addMenuItem(7, 2,
> > > EpiString.GetString("menuJobReceiptToSalvage"), "HHMN2005", "M");
> > > this.addMenuItem(7, 3, EpiString.GetString("menuReturnAssembly"),
> > > "HHMN2006", "M");
> > > this.addMenuItem(7, 4, EpiString.GetString("menuReturnMaterial"),
> > > "HHMN2007", "M");
> > > this.addMenuItem(8, 0, EpiString.GetString("menuAdjustInventory"),
> > > "HHMN2008", "M");
> > > this.addMenuItem(8, 1, EpiString.GetString("menuCountEntry"),
> > > "HHMN2009", "M");
> > > this.addMenuItem(8, 2, EpiString.GetString("menuMoveInventory"),
> > > "HHMN2010", "M");
> > > this.addMenuItem(8, 3,
> > > EpiString.GetString("menuUnpickSalesOrder"), "HHMN2040", "M");
> > > this.addMenuItem(8, 4, EpiString.GetString("menuUnpickTransOrder"),
> > > "HHMN2041", "M"); this.addMenuItem(9, 0,
> > > EpiString.GetString("menuIssueAssembly"),
> > > "HHMN2011", "M");
> > > this.addMenuItem(9, 1, EpiString.GetString("menuIssueMaterial"),
> > > "HHMN2012", "M");
> > > this.addMenuItem(10, 0,
> > > EpiString.GetString("menuContainerArrival"), "HHMN4020", "R");
> > > this.addMenuItem(10, 1,
> > > EpiString.GetString("menuContainerReceipts"),
> > > "HHMN4021", "R"); this.addMenuItem(10, 2,
> > > EpiString.GetString("menuICReceipts"),
> > > "HHMN4007", "R");
> > > this.addMenuItem(10, 3, EpiString.GetString("menuPOReceipts"),
> > > "HHMN4001", "R");
> > > this.addMenuItem(10, 4, EpiString.GetString("menuTOReceipts"),
> > > "HHMN4005", "R");
> > > this.addMenuItem(11, 0,
> > > EpiString.GetString("menuConfirmShipments"), "HHMN4002", "R");
> > > this.addMenuItem(11, 1, EpiString.GetString("menuMasterpack"),
> > > "HHMN4010", "R");
> > > this.addMenuItem(11, 2, EpiString.GetString("menuMiscShipment"),
> > > "HHMN4009", "R");
> > > this.addMenuItem(11, 3,
> > > EpiString.GetString("menuSubcontractShipment"), "HHMN4008", "R");
> > > this.addMenuItem(11, 4, EpiString.GetString("menuCustomerMassShip"),
> > > "HHMN4004", "R"); this.addMenuItem(11, 5,
> > > EpiString.GetString("menuPickedOrders"),
> > > "HHMN4003", "R");
> > > this.addMenuItem(11, 6, EpiString.GetString("menuTOShipment"),
> > > "HHMN4006", "R");
> > > this.addMenuItem(11, 7, EpiString.GetString("menuPackout"),
> > > "HHMN4011", "R");
> > > }
> > >
> > >
> > >
> >
> > [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
> >
> >
> >
>
> [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
>
>
>