# Button to Refresh All on Tracker in Dashboard

**URL:** <https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130>\
**Category:** Epicor ERP 10\
**Tags:** dashboard, customization, e10\
**Created:** [May 29, 2025, 6:03pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130 "2025-05-29T18:03:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronssh](https://www.epiusers.help/user_avatar/www.epiusers.help/aaronssh/32/19406_2.png) [@aaronssh](https://www.epiusers.help/u/aaronssh)\
**Post date:** [May 29, 2025, 6:03pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/1 "2025-05-29T18:03:06Z")

</div>

I inherited someone’s Dashboard and am being asked to fix the Clear button on the tracker portion of the dashboard. They claim that it used to work but now it does nothing when clicked. All that I actually need it to do is to execute a Refresh All (like pressing the white circle icon along the top). Can someone help me figure out how to make this button do that? Thank you!

This is the code that is there in Script Editor when Customizing the Tracker.

```auto
// **************************************************
// Custom code for 54f2113e-302e-4539-a2f1-3c3b68881bcf
// Created: 7/24/2020 2:12:04 PM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public static class 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 **

	public static void InitializeCustomCode()
	{
		// **Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines**
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls

		Script.clearButton.Click += new System.EventHandler(Script.clearButton_Click);
		// End Wizard Added Custom Method Calls
	}

	public static void DestroyCustomCode()
	{
		// **Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines**
		// Begin Wizard Added Object Disposal

		Script.clearButton.Click -= new System.EventHandler(Script.clearButton_Click);
		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
	}

	private static void clearButton_Click(object sender, System.EventArgs args)
	{
		/*
		txtUD01_DiameterCode_c.Value = "";
		txtUD01_LeadCode_c.Value = "";
		txtUD01_Hand_c.Value = "";
		txtUD01_epicorPN_c.Value = "";
		*/
	}
}

```

---

<div class="post-metadata">

**Author:** ![hmwillett](https://www.epiusers.help/user_avatar/www.epiusers.help/hmwillett/32/93207_2.png) [@hmwillett](https://www.epiusers.help/u/hmwillett)\
**Post date:** [May 29, 2025, 6:13pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/2 "2025-05-29T18:13:46Z")

</div>

You should be able to do something like this:

```cs
MainController.AppControlPanel.HandleToolClick(RefreshTool, new Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools[RefreshTool], null));

```

You can change that to RefreshAllTool if needed.

---

<div class="post-metadata">

**Author:** ![klincecum](https://www.epiusers.help/user_avatar/www.epiusers.help/klincecum/32/100137_2.png) [@klincecum](https://www.epiusers.help/u/klincecum)\
**Post date:** [May 29, 2025, 6:15pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/3 "2025-05-29T18:15:20Z")

</div>

> [@Dashboard Refresh after tab out of EpiTextBox](https://www.epiusers.help/t/dashboard-refresh-after-tab-out-of-epitextbox/53812/2):
>
> Use this code instead. MainController.AppControlPanel.HandleToolClick("RefreshTool", new Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools["RefreshTool"], null));

---

<div class="post-metadata">

**Author:** ![aaronssh](https://www.epiusers.help/user_avatar/www.epiusers.help/aaronssh/32/19406_2.png) [@aaronssh](https://www.epiusers.help/u/aaronssh)\
**Post date:** [May 29, 2025, 6:20pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/4 "2025-05-29T18:20:53Z")

</div>

> [@Dashboard Refresh after tab out of EpiTextBox](https://www.epiusers.help/t/dashboard-refresh-after-tab-out-of-epitextbox/53812/2):
>
> MainController.AppControlPanel.HandleToolClick(“RefreshTool”, new Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools[“RefreshTool”], null));

I tried changing it to that but I get this when trying to compile the dashboard:

```auto

## System Information ##
==================

AppServer Connection: net.tcp://xxxxxxx/ERP102700-Live
Form Name: Dashboard
Customization Name: 
Menu ID: 
Software Version: 3.2.700.40

============

Application Error

## Error Detail ##
============
##!Message:##! --------compile errors------------
 Error: CS0117 - line 1022 (1021) - 'Ice.UI.App.ScrewThreadMaster.MainController' does not contain a definition for 'AppControlPanel'
 Error: CS0117 - line 1022 (1021) - 'Ice.UI.App.ScrewThreadMaster.MainController' does not contain a definition for 'MainToolManager'

 **Compile Failed.**

##!Program:##! 
##!Method:##! 

```

---

<div class="post-metadata">

**Author:** ![aaronssh](https://www.epiusers.help/user_avatar/www.epiusers.help/aaronssh/32/19406_2.png) [@aaronssh](https://www.epiusers.help/u/aaronssh)\
**Post date:** [May 29, 2025, 6:22pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/5 "2025-05-29T18:22:24Z")

</div>

I tried changing it to that, but when I do I get these errors when trying to compile the dashboard:

```auto

## System Information ##
==================

AppServer Connection: net.tcp://xxxxxxxx/ERP102700-Live
Form Name: Dashboard
Customization Name: 
Menu ID: 
Software Version: 3.2.700.40

============

Application Error

## Error Detail ##
============
##!Message:##! --------compile errors------------
 Error: CS0117 - line 1022 (1021) - 'Ice.UI.App.ScrewThreadMaster.MainController' does not contain a definition for 'AppControlPanel'
 Error: CS0103 - line 1022 (1021) - The name 'RefreshTool' does not exist in the current context
 Error: CS0117 - line 1022 (1021) - 'Ice.UI.App.ScrewThreadMaster.MainController' does not contain a definition for 'MainToolManager'
 Error: CS0103 - line 1022 (1021) - The name 'RefreshTool' does not exist in the current context

 **Compile Failed.**

##!Program:##! 
##!Method:##! 

```

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 29, 2025, 6:22pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/6 "2025-05-29T18:22:53Z")

</div>

You aren’t trying to do the customization in the dashboard maintenance are you? This won’t work there. You need to go into the customization on the deployed dashboard.

---

<div class="post-metadata">

**Author:** ![aaronssh](https://www.epiusers.help/user_avatar/www.epiusers.help/aaronssh/32/19406_2.png) [@aaronssh](https://www.epiusers.help/u/aaronssh)\
**Post date:** [May 29, 2025, 6:24pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/7 "2025-05-29T18:24:06Z")

</div>

Yes, I have been trying to do it in dashboard maintenance. Why is it that it can’t be done there?

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 29, 2025, 6:25pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/8 "2025-05-29T18:25:03Z")

</div>

It’s because it doesn’t have access to the rest of the form. Only what’s in the tracker window. The refresh or clear button is out of the scope of that customization.

---

<div class="post-metadata">

**Author:** ![aaronssh](https://www.epiusers.help/user_avatar/www.epiusers.help/aaronssh/32/19406_2.png) [@aaronssh](https://www.epiusers.help/u/aaronssh)\
**Post date:** [May 29, 2025, 6:26pm UTC](https://www.epiusers.help/t/button-to-refresh-all-on-tracker-in-dashboard/126130/9 "2025-05-29T18:26:50Z")

</div>

Ah ok. Thank you for that. I had tried many options from Claude and Grok before coming here and none of them were working. This explains why.
