# Webpage in dashboard

**URL:** <https://www.epiusers.help/t/webpage-in-dashboard/48752>\
**Category:** Epicor ERP 10\
**Created:** [October 15, 2018, 2:58pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752 "2018-10-15T14:58:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 2:58pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/1 "2018-10-15T14:58:50Z")

</div>

I would like to embed a webpage in a dashboard and pass parameters to it as well.  
I did a URL/XSLT view, the problem is that it makes a whole new tab. I need this webpage view to be a tab beneath another sheet. So, I want to just take it into customization mode, make a sheet where I need it and then add the necessary code. The problem is I don’t know how to write the code for this.

The webpage I need it to go is: [http://envisionpp/test/callLogViewer.asp?custnum=[custid]](http://envisionpp/test/callLogViewer.asp?custnum=%5Bcustid%5D). I need to be able to pass the parameter of custid based upon a search done in another BAQ in the Dashboard.

---

<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:** [October 15, 2018, 3:00pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/2 "2018-10-15T15:00:28Z")

</div>

I use a web service to get QR codes. You could do the same thing. Check out this thread on how to use Tokens in a dashboard.

> **[QR codes on screen?](https://www.epiusers.help/t/qr-codes-on-screen/38956/10)**
>
> So here’s an example with screen shots, as I need this for some testing. The first thing you have to do before setting up the URL viewer is publish the columns that you want. In my case I just want the part number, so that’s what I pick. ...

For your customization, can you make a tab, then move the tab into the sheet?

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 3:43pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/3 "2018-10-15T15:43:02Z")

</div>

How do you move the tab down into the sheet?

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 3:49pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/4 "2018-10-15T15:49:01Z")

</div>

I have several different sheets so I don’t want it to always show up. I want it to only show up when I am in a particular tab.

---

<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:** [October 15, 2018, 4:01pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/5 "2018-10-15T16:01:39Z")

</div>

In a dashboard, unfortunately you can’t have a mix of tabs and sheets. I’ve had that problem in the past, and I basically just got as creative as I could with what I could do and was able to arrange something that worked.

I regular screen where you are embedding a dashboard, you can get a dashboard into the right sheet, but it doesn’t work if you are purely in a dashboard.

---

<div class="post-metadata">

**Author:** ![josephmoeller](https://www.epiusers.help/user_avatar/www.epiusers.help/josephmoeller/32/81429_2.png) [@josephmoeller](https://www.epiusers.help/u/josephmoeller)\
**Post date:** [October 15, 2018, 4:18pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/6 "2018-10-15T16:18:43Z")

</div>

@hkeric.wci posted a blog on the use of embedded browser links on linkedin here: [[Snippet] Epicor Simple Browser Helper](https://www.linkedin.com/pulse/snippet-epicor-simple-browser-dialog-helper-haso-keric/)

You may be able to find a way to somehow bind this to the beneath tab, though this is something to work with.

---

<div class="post-metadata">

**Author:** ![jstephens](https://www.epiusers.help/letter_avatar_proxy/v4/letter/j/f05b48/32.png) [@jstephens](https://www.epiusers.help/u/jstephens)\
**Post date:** [October 15, 2018, 4:18pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/7 "2018-10-15T16:18:44Z")

</div>

What about adding programmatically adding a WebBrowser control?  
See: [WebBrowser Class (System.Windows.Forms) | Microsoft Learn](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.webbrowser?view=netframework-4.7.2)

We’ve done this in a few places where we need to show web content dynamically and don’t want the user to have to go out of Epicor to get it. I’ve never implemented it in a dashboard, but it’s all built in the standard customization engine so it should carry through.

You’ll need to initialize it yourself in the customization, but after you reload the customization it shows up just like a standard control. From there you can control the location and sizing.

Here’s an example of some code we used to bootstrap the browser window:

```
/ ************************ /
/* IN THE SCRIPT CLASS */
/ ************************ /
/*initialize a web browser global variable*/
WebBrowser browserDisplay = new WebBrowser();

/ **************************************** /
/* IN THE InitializeCustomCode() METHOD */
/ **************************************** /
/*initialize and define how the browser should look in the InitializeCustomCode() method*/
/*this particular browser expands to fill the whole of a tab defined as customTab*/
browserDisplay.Dock = System.Windows.Forms.DockStyle.Fill;
browserDisplay.Location = new System.Drawing.Point(0, 0);
browserDisplay.MinimumSize = new System.Drawing.Size(20, 20);
browserDisplay.Name = "browserDisplay";
browserDisplay.Size = new System.Drawing.Size(784, 561);
browserDisplay.TabIndex = 9999;
browserDisplay.WebBrowserShortcutsEnabled = false;
browserDisplay.IsWebBrowserContextMenuEnabled = false;
browserDisplay.ScriptErrorsSuppressed = true;
customTab.Controls.Add(browserDisplay);
browserDisplay.BringToFront();
/*navigate to a blank page on initialization*/
browserDisplay.Navigate("about:blank");

/ ********************************************** /
/* IN SOME EVENT METHOD CREATED BY A WIZARD */
/ ********************************************** /
/*provide a new url and load that page*/
string newUrl = "http://envisionpp/test/callLogViewer.asp?custnum="+[custid];
browserDisplay.Navigate(newUrl);

```

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 6:57pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/8 "2018-10-15T18:57:33Z")

</div>

Okay, I have made progress. I have the webpage populating when I hard code the value.

````auto
		private void SetupBrowser()
                {
				wbSite = new System.Windows.Forms.WebBrowser();
				wbSite.Dock = System.Windows.Forms.DockStyle.Fill;
				wbSite.Location = new System.Drawing.Point(0,0);
				wbSite.MinimumSize = new System.Drawing.Size(20,20);
				wbSite.Name = "wbSite";
				wbSite.Size = new System.Drawing.Size(560,323);
				wbSite.TabIndex=0;
				wbSite.WebBrowserShortcutsEnabled = false;
				wbSite.IsWebBrowserContextMenuEnabled = false;
				wbSite.ScriptErrorsSuppressed = true;
				grpboxQuickNotes.Controls.Add(wbSite);
				//custnum = epiTextCustNumReference2.Text;
				custnum = "24989";
				wbSite.Navigate("http://envisionpp/test/callLogViewer.asp?custnum=" + custnum.ToString()); 
                                
                }```

However, I don't want to hard code the value I want the line that is commented out: //custnum = epiTextCustNumReference2.Text to feed the website browser with the customer number.
````

---

<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:** [October 15, 2018, 7:14pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/9 "2018-10-15T19:14:22Z")

</div>

Where is the epiTextCustNumReference2 coming from? I’m trying to figure out what you need to do to get it to work.

what happens if you don’t use custnum at all and just use epiTextCustNumReference2.Value.ToString() ?

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 7:24pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/10 "2018-10-15T19:24:33Z")

</div>

epiTextCustNumReference2 is the text box that contains the value I need to pass into the webpage. It contains the customer number.

When I just try to put in epiTextCustNumReference2.ToString(); nothing happens. Do I need to have the webpage refresh maybe after I enter a value in that text box. I tried doing the Refresh all after I enter a number in there but it doesn’t work.

---

<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:** [October 15, 2018, 7:24pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/11 "2018-10-15T19:24:54Z")

</div>

did you add .Value ?

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 7:25pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/12 "2018-10-15T19:25:23Z")

</div>

No, it is actually a text box. Not a numberic editor. Do I still need to do .Value?

---

<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:** [October 15, 2018, 7:25pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/13 "2018-10-15T19:25:52Z")

</div>

I don’t know, but try it. I’m shooting in the dark a little. I’ve needed to do it in the past.

```auto
wbSite.Navigate("http://envisionpp/test/callLogViewer.asp?custnum=" + epiTextCustNumReference2.Value.ToString());

```

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 7:27pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/14 "2018-10-15T19:27:38Z")

</div>

That doesn’t work it causes an error when I launch: Exception has been thrown by the target of an invocation.

---

<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:** [October 15, 2018, 7:28pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/15 "2018-10-15T19:28:54Z")

</div>

If you just do a message is the text reading correctly?

MessageBox.Show(epiTextCustNumReference2.ToString());

or just a message box with the custnum MessageBox.Show(custnum);

---

<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:** [October 15, 2018, 7:33pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/16 "2018-10-15T19:33:54Z")

</div>

Is this a typo? does it compile with this?

 ![image](https://epiusers.help/uploads/default/original/2X/1/1624f6a5575ed353cdfcbf550d97eace03fee3fd.png)

Never mind, that’s your own variable. (I’m trying too hard…)

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 7:34pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/17 "2018-10-15T19:34:23Z")

</div>

It compiles with that. I;m adding Message Box Now and will let you know.

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 7:39pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/18 "2018-10-15T19:39:53Z")

</div>

It doesnt return the right information and it does it right at launch of dashboard. I need to be able to enter a number in that text box and then refresh and have it go get the correct webpage.

---

<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:** [October 15, 2018, 7:42pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/19 "2018-10-15T19:42:10Z")

</div>

So you’ll have to find a different event to hang it off of. I would think an, “after field change” on that text box would be what you want for that one. I don’t know how the web page stuff works, but I would imagine that you need the set up stuff where you have it, and then just move the navigate to the after field change event.

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [October 15, 2018, 7:46pm UTC](https://www.epiusers.help/t/webpage-in-dashboard/48752/20 "2018-10-15T19:46:37Z")

</div>

I tried that…ugh. I think I’m just gonna make it its own dashboard and attach that to the sheet. I give up…

[Next page](https://www.epiusers.help/t/webpage-in-dashboard/48752.md?page=2)
