Dashboard Hyperlinks

Line 58 in your script is looking for a closing curly.
Make sure all of your curly braces match.

ok so i seem to be moving backwards…I noticed that my first section was missing a closed { to contain that argument…I added that and now I have a wack load of more errors…

--------compile errors------------
Error: CS1518 - line 30 (104) - Expected class, delegate, enum, interface, or struct
Error: CS1518 - line 42 (116) - Expected class, delegate, enum, interface, or struct
Error: CS1518 - line 54 (128) - Expected class, delegate, enum, interface, or struct
Error: CS1001 - line 58 (132) - Identifier expected
Error: CS1001 - line 58 (132) - Identifier expected

I feel like I am missing a good chunk of information…hopefully this isn’t taking too much of your time!

Can you paste your entire script here?

// **************************************************
// Custom code for MainController
// Created: 2/6/2019 8:22:40 AM
// **************************************************
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 class Script
    {
       // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
       // Begin Wizard Added Module Level Variables **
       EpiUltraGrid myGrid;
       // End Wizard Added Module Level Variables **

       // Add Custom Module Level Variables Here **
    }

       public void InitializeCustomCode()
       {
          // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
          // Begin Wizard Added Variable Initialization
          this.myGrid = (EpiUltraGrid)csm.GetNativeControlReference("dab7a769-c466-4ba1-819e-f6a9217f8e00");
          // End Wizard Added Variable Initialization

          // Begin Wizard Added Custom Method Calls

          // End Wizard Added Custom Method Calls
       }

       public void DestroyCustomCode()
       {
          // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
          // Begin Wizard Added Object Disposal
          this.myGrid = null;
          // End Wizard Added Object Disposal

          // Begin Custom Code Disposal

          // End Custom Code Disposal
       }

       private void MainController_Load(object sender, EventArgs args)
       {
          // Add Event Handler Code

          myGrid.DisplayLayout.Bands[0].Columns["LaborDtl_Comment_c"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;    
       }

Your script is cut short.

Clarification image:

Hey can you check out this thread? Formatting your code blocks really helps people be able to read what you are posting. All it is is three tick marks ( ` ) before and after your code. Thanks.

yeah the second one was what I just added when I was looking for missing closing curlys…when I remove that I get the single compile error:

--------compile errors------------
Error: CS1513 - line 59 (133) - } expected

** Compile Failed. **

Thanks Brandon, wasn’t aware of that…still a bit new to this aspect of Epicor (only been using for a few months) so the codes side of thing is still very new. I will keep that in mind moving forward.

Based on this error, and the second screen shot in my previous message, it would tell me that you’re still missing that closing brace.

So, when you add that, you start getting these?

It should look something like this:

// **************************************************
// Custom code for MainController
// Created: 2/6/2019 8:22:40 AM
// **************************************************
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 class Script
{
   // ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ 
   //Comments! **
   // Begin Wizard Added Module Level Variables **
   EpiUltraGrid myGrid;
   // End Wizard Added Module Level Variables **
   // Add Custom Module Level Variables Here **

   public void InitializeCustomCode()
   {
      // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
      // Begin Wizard Added Variable Initialization
      this.myGrid = (EpiUltraGrid)csm.GetNativeControlReference("dab7a769-c466-4ba1-819e-f6a9217f8e00");
      // End Wizard Added Variable Initialization

      // Begin Wizard Added Custom Method Calls

      // End Wizard Added Custom Method Calls
   }

   public void DestroyCustomCode()
   {
      // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
      // Begin Wizard Added Object Disposal
      this.myGrid = null;
      // End Wizard Added Object Disposal

      // Begin Custom Code Disposal

      // End Custom Code Disposal
   }

   private void MainController_Load(object sender, EventArgs args)
   {
      // Add Event Handler Code

      myGrid.DisplayLayout.Bands[0].Columns["LaborDtl_Comment_c"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;    
   }
}
1 Like

It’s not an Epicor thing, it’s a forum thing.

Oh man…thats all it was…Rookie mistake…

Works exactly as advertised now!

Can’t thank you enough for the help this morning, really couldn’t have done it without your guidance!

Thanks!!

1 Like

Yeah I guess I just haven’t had to paste in code up until now ha ha. I did correct the previous point. I appreciate you pointing it out though, will remember that in the future.

Thanks

1 Like

I’m following this thread and now I need to do this. I follow what has been posted, here.

When I save my dashboard and then reopen it I get this error:
Application Error

Exception caught in: Ice.Lib.EpiClientLib

Error Detail

Message: Unable to find custom script class start.
Program: Ice.Lib.EpiClientLib.dll
Method: InsertCodeDomIntoCode

I don’t know what the error is telling. I’m not the greatest at C#.
Also, I’m noticing my column name has a word space in it. Perhaps that can effect this? Just looking for differences.

    {
       // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
       // Begin Wizard Added Module Level Variables **
       EpiUltraGrid myGrid;
       // End Wizard Added Module Level Variables **

       // Add Custom Module Level Variables Here **

       public void InitializeCustomCode()
       {
          // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
          // Begin Wizard Added Variable Initialization
          this.myGrid = (EpiUltraGrid)csm.GetNativeControlReference("81214b73-e14a-482d-b5d3-8d7930fb4e00");
          // End Wizard Added Variable Initialization

          // Begin Wizard Added Custom Method Calls

          // End Wizard Added Custom Method Calls
       }

       public void DestroyCustomCode()
       {
          // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
          // Begin Wizard Added Object Disposal
          this.myGrid = null;
          // End Wizard Added Object Disposal

          // Begin Custom Code Disposal

          // End Custom Code Disposal
       }

       private void MainController_Load(object sender, EventArgs args)
       {
          // Add Event Handler Code

          myGrid.DisplayLayout.Bands[0].Columns["Doc Link"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;    
       }```

Can you edit your formatting, so I can read it a bit better?
You have single quotes, but they should be the accent below the escape key on your keyboard: ```

Looking at what you have, you can’t have a column named “Doc Link”. That’s very likely the visible label, not the column name.

Would this make more sense?

“XFileRef_XFileName”

Yes–it would.

That looks like it!
Thank you!
Ben

1 Like

Hey, the link works when I’m in Developer Mode, but not ‘regular’. It is just normal text.
Is that one of those things where I have to clear out the older version?

Most likely.
Close the form, clear your cache, then try again.

I tried to clear cache. Didn’t help.
I wanted to wait a day to see if overnight on the server would clear out cobwebs. Nope.

My Hyperlinks only show in “Developer Mode”. Very odd!