oTrans/csm in dashboard

Hi, Im adding customization to my dashboard Tracker View and would like to know if there is a way to access the oTrans variable in the code (im trying to get AppServer value)? I usually do ((Ice.Core.Session)oTrans).AppServer but oTrans seems not known here (The name ‘oTrans’ does not exist in the current context)

Ive also tried creating it from scratch:

Ice.Core.Session oTrans = ((Ice.Core.Session)(csm.GetGlobalInstance(“oTrans”)));

but csm seem not accessible neither (The name ‘csm’ does not exist in the current context) even if it is declared globablly in the “hidden code” (private static Ice.Lib.Customization.CustomScriptManager csm;)

Any thought?

thanks,

oTrans and csm are not available in Dashboards directly. What are you trying to get (End Goal)?

Hi Jose,

Im trying to get the value of ((Ice.Core.Session)oTrans).AppServer. I then open an external .net app (that allows writing in E10) that will use the variable value when opening a session with E10.

using (Session session = new Ice.Core.Session(ConfigurationManager.AppSettings[“SessionUsername”], Encryption.DecryptString(ConfigurationManager.AppSettings[“SessionPassword”]), strAppServer, Session.LicenseType.Default, strConfigFile, true, strCompany))

thanks,

Hmm I’m a little lost, are you calling your App from within the Dashboard and passing in the session?

If so, check out this thread where i gave a “better” answer on how to accomplish this using the built in session management objects

You could do the following:

  1. Deploy Dashboard
  2. Assign it to a MENU ID as Dashboard-Assembly
  3. Create a Customization Layer on the Menu

You should be able to access the csm and oTrans there, you just can’t access it in the Dashboards limited Tracker Customization Layer. But on this Level you should be able to do everything.

Im calling my app within the dashboard, correct. Im not passing the session itself, only the value of AppServer. Im creating back a new session in my app and using that AppServer value where the strAppServer variable is mentioned in my previous reply.

thanks,

Thanks for the suggestion hasokeric, however im using my dashboard as a embbeded one in my Customer Tracker (as a new tab). I dont think I can apply a menu on it, right?

See if you can use this option:

2018-05-10_0838

I just did before you replied lol. Seems to be what I need, however for some reason it loads the base version of my menu, not the customized one. When I open the menu on its own, it works perfectly. Is this a limitation of embedded menu dashboards?

Thanks again

Good Question - I assumed it would pull your Menu Stuff. Perhaps @josecgomez or @timshuwy or @Bart_Elia know. I have intention of using this as well a few days from now.

if you do an appbuilder, it is associated with the menu ID (Including the customization that you have associated in the menu).

Did you try it on your end also, just for confirming? A colleague of mine tried on his end and it loads the base menu for him also.

Can you send a screenshot from within your Menu Maintenance - of that particular Menu

Quick Question - After you applied Customization and hit Save, did you restart your Epicor Client?

Also try going to C:\ProgramData\Epicor and clearing your cache - theres something about Dashboards - if after that you yield no positive results then it looks like your assumption may be right, which sucks.

I did, also tried doing Clear Client Cache from setting menu and restart, no luck :frowning:

Thanks

Seems not working for us (on 10.1.400.31). Can it be a glitch fixed in a later version? Planning to upgrade to 10.2 soon.