"Click" Refresh button with code

Hi Simon,

Can you try this and let me now if it works.

                Private Sub epiButtonC1_Click(ByVal sender As Object, ByVal args As System.EventArgs)
                                Dim appController as UIApp.AppController = CType(oTrans, UIApp.AppController)
                                if Not(appController is nothing)
                                                appController.OnRefresh()
                                end if
                End Sub





From: "s1mhall@…" <s1mhall@…>
To: vantage@yahoogroups.com
Sent: Sunday, December 15, 2013 5:54 PM
Subject: [Vantage] RE: "Click" Refresh button with code



Ted,
Just wondering if you got this sorted out?  I have a similar problem, but when a user refreshes and we have groups on the dashboard it expands the tree to the first record in the BAQ based on the sort order.  My users really want the tree to remain collapsed on refresh, or even better to have it expanded to the show results where they are the Case Owner.

Previously I have not had any luck of actually loading a dashboard based on the who the user is logged in.  I believe the employeeid constant is only populated if you have MES and they clock in.  Can anyone confirm.

We are on 701 SQL

Cheers
Simon Hall





So far I am striking out with everything I have tried. I created a dashboard and want it to refresh after a certain allotted amount of time. For this I'm using a timer and inside the tick event i want to call the refresh button.

Here is what I have been trying but it does not work.

Dim frmDash As Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm = CType(csm.GetNativeControlReference("B564E070-3328-4f86-BF70-DD1C139CCB21"), Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm)
Dim methInfo As MethodInfo = frmDash.GetType().GetMethod("RefreshDB")
If Not (methInfo Is Nothing) Then
methInfo.Invoke(frmDash, Nothing)
End If
Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
If Not mi Is Nothing Then
mi.Invoke(frmDash, New Object() {})
End If

Thanks for any help,

Ted
Ted, in other customizations I simply did a: oTrans.Refresh() and it did
wahat you wanted. Never tried it on Dashboards, however.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
tkoch77
Sent: Thursday, June 28, 2012 11:51 AM
To: vantage@yahoogroups.com
Subject: [Vantage] "Click" Refresh button with code





So far I am striking out with everything I have tried. I created a dashboard
and want it to refresh after a certain allotted amount of time. For this I'm
using a timer and inside the tick event i want to call the refresh button.

Here is what I have been trying but it does not work.

Dim frmDash As Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm =
CType(csm.GetNativeControlReference("B564E070-3328-4f86-BF70-DD1C139CCB21"),
Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm)
Dim methInfo As MethodInfo = frmDash.GetType().GetMethod("RefreshDB")
If Not (methInfo Is Nothing) Then
methInfo.Invoke(frmDash, Nothing)
End If
Dim mi As MethodInfo =
GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB",
BindingFlags.NonPublic Or BindingFlags.Instance)
If Not mi Is Nothing Then
mi.Invoke(frmDash, New Object() {})
End If

Thanks for any help,

Ted



No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2437/5098 - Release Date: 06/28/12




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2180 / Virus Database: 2437/5098 - Release Date: 06/28/12

[Non-text portions of this message have been removed]
Did you try the Refresh Interval under the Dashboard Query Properties?

120 = 2 minutes

9.05.607a

Miguel A. Santillan
Compass Components, Inc.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tkoch77
Sent: Thursday, June 28, 2012 8:51 AM
To: vantage@yahoogroups.com
Subject: [Vantage] "Click" Refresh button with code



So far I am striking out with everything I have tried. I created a dashboard and want it to refresh after a certain allotted amount of time. For this I'm using a timer and inside the tick event i want to call the refresh button.

Here is what I have been trying but it does not work.

Dim frmDash As Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm = CType(csm.GetNativeControlReference("B564E070-3328-4f86-BF70-DD1C139CCB21"), Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm)
Dim methInfo As MethodInfo = frmDash.GetType().GetMethod("RefreshDB")
If Not (methInfo Is Nothing) Then
methInfo.Invoke(frmDash, Nothing)
End If
Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
If Not mi Is Nothing Then
mi.Invoke(frmDash, New Object() {})
End If

Thanks for any help,

Ted



[Non-text portions of this message have been removed]
Didn't even think of that miguel, works well. The only thing that sucks is it collapses expanded groups. I dont think theres anything I can do about that though.


Thanks.



________________________________
From: Miguel Santillan <msantillan@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, June 28, 2012 11:56 AM
Subject: RE: [Vantage] "Click" Refresh button with code

Did you try the Refresh Interval under the Dashboard Query Properties?

120 = 2 minutes

9.05.607a

Miguel A. Santillan
Compass Components, Inc.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tkoch77
Sent: Thursday, June 28, 2012 8:51 AM
To: vantage@yahoogroups.com
Subject: [Vantage] "Click" Refresh button with code



So far I am striking out with everything I have tried. I created a dashboard and want it to refresh after a certain allotted amount of time. For this I'm using a timer and inside the tick event i want to call the refresh button.

Here is what I have been trying but it does not work.

Dim frmDash As Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm = CType(csm.GetNativeControlReference("B564E070-3328-4f86-BF70-DD1C139CCB21"), Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm)
Dim methInfo As MethodInfo = frmDash.GetType().GetMethod("RefreshDB")
If Not (methInfo Is Nothing) Then
methInfo.Invoke(frmDash, Nothing)
End If
Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
If Not mi Is Nothing Then
mi.Invoke(frmDash, New Object() {})
End If

Thanks for any help,

Ted



[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/.%c2%a0
(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]
Well I am back to being stuck on this. Miguel's suggestion did work, but I am seeking more control over when refresh is actually called. Not sure how invoke the refresh button from a dashboard and I don't think there is a way to programmatically click a toolbar tool. Here is the code I have been playing with. Any help appreciated.

         Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
         If Not mi Is Nothing Then
            mi.Invoke(MainController, New Object() {})
         End If


-Ted



________________________________
From: Ted Koch <tkoch77@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, June 28, 2012 12:12 PM
Subject: Re: [Vantage] "Click" Refresh button with code

Didn't even think of that miguel, works well. The only thing that sucks is it collapses expanded groups. I dont think theres anything I can do about that though.


Thanks.



________________________________
From: Miguel Santillan <msantillan@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, June 28, 2012 11:56 AM
Subject: RE: [Vantage] "Click" Refresh button with code

Did you try the Refresh Interval under the Dashboard Query Properties?

120 = 2 minutes

9.05.607a

Miguel A. Santillan
Compass Components, Inc.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tkoch77
Sent: Thursday, June 28, 2012 8:51 AM
To: vantage@yahoogroups.com
Subject: [Vantage] "Click" Refresh button with code



So far I am striking out with everything I have tried. I created a dashboard and want it to refresh after a certain allotted amount of time. For this I'm using a timer and inside the tick event i want to call the refresh button.

Here is what I have been trying but it does not work.

Dim frmDash As Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm = CType(csm.GetNativeControlReference("B564E070-3328-4f86-BF70-DD1C139CCB21"), Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm)
Dim methInfo As MethodInfo = frmDash.GetType().GetMethod("RefreshDB")
If Not (methInfo Is Nothing) Then
methInfo.Invoke(frmDash, Nothing)
End If
Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
If Not mi Is Nothing Then
mi.Invoke(frmDash, New Object() {})
End If

Thanks for any help,

Ted



[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/.%c2%a0
(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/.%c2%a0
(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]
While looking through the ICE Customization Guide I stumbled across this bit of code on page 206 that is supposed to call the refresh button on the dashboard, but it does not work. Can anyone verify?

https://epicweb.epicor.com/doc/Docs/EpicorUserExpCust_UserGuide_905700_Part2of3.pdf

Thanks,

-Ted

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> Well I am back to being stuck on this. Miguel's suggestion did work, but I am seeking more control over when refresh is actually called. Not sure how invoke the refresh button from a dashboard and I don't think there is a way to programmatically click a toolbar tool. Here is the code I have been playing with. Any help appreciated.
>
> Â Â Â Â Â Â Â Â Â Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
> Â Â Â Â Â Â Â Â Â If Not mi Is Nothing Then
> Â Â Â Â Â Â Â Â Â Â Â Â mi.Invoke(MainController, New Object() {})
> Â Â Â Â Â Â Â Â Â End If
>
>
> -Ted
>
>
>
> ________________________________
> From: Ted Koch <tkoch77@...>
> To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> Sent: Thursday, June 28, 2012 12:12 PM
> Subject: Re: [Vantage] "Click" Refresh button with code
>
> Didn't even think of that miguel, works well. The only thing that sucks is it collapses expanded groups. I dont think theres anything I can do about that though.
>
>
> Thanks.
>
>
>
> ________________________________
> From: Miguel Santillan <msantillan@...>
> To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> Sent: Thursday, June 28, 2012 11:56 AM
> Subject: RE: [Vantage] "Click" Refresh button with code
>
> Did you try the Refresh Interval under the Dashboard Query Properties?
>
> 120 = 2 minutes
>
> 9.05.607a
>
> Miguel A. Santillan
> Compass Components, Inc.
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tkoch77
> Sent: Thursday, June 28, 2012 8:51 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] "Click" Refresh button with code
>
>
>
> So far I am striking out with everything I have tried. I created a dashboard and want it to refresh after a certain allotted amount of time. For this I'm using a timer and inside the tick event i want to call the refresh button.
>
> Here is what I have been trying but it does not work.
>
> Dim frmDash As Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm = CType(csm.GetNativeControlReference("B564E070-3328-4f86-BF70-DD1C139CCB21"), Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm)
> Dim methInfo As MethodInfo = frmDash.GetType().GetMethod("RefreshDB")
> If Not (methInfo Is Nothing) Then
> methInfo.Invoke(frmDash, Nothing)
> End If
> Dim mi As MethodInfo = GetType(Epicor.Mfg.UI.FrameWork.UIApp.EpiHostForm).GetMethod("RefreshDB", BindingFlags.NonPublic Or BindingFlags.Instance)
> If Not mi Is Nothing Then
> mi.Invoke(frmDash, New Object() {})
> End If
>
> Thanks for any help,
>
> Ted
>
>
>
> [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/.%c2%a0
> (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/.%c2%a0
> (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]
>
Ted,
Just wondering if you got this sorted out?  I have a similar problem, but when a user refreshes and we have groups on the dashboard it expands the tree to the first record in the BAQ based on the sort order.  My users really want the tree to remain collapsed on refresh, or even better to have it expanded to the show results where they are the Case Owner.

Previously I have not had any luck of actually loading a dashboard based on the who the user is logged in.  I believe the employeeid constant is only populated if you have MES and they clock in.  Can anyone confirm.

We are on 701 SQL

Cheers
Simon Hall