What is the proper way to access a SESSION object?
I’ve read articles saying:
Ice.Core.Session SOSession: The type or namespace name ‘Session’ does not exist in the namespace ‘Ice.Core’ (are you missing an assembly reference?)
((Mfg.Core.Session)oTrans.Session).UserName : Error CS0234: The type or namespace name ‘Mfg’ does not exist in the namespace ‘Epicor’ (are you missing an assembly reference?)
I am starting to think I maybe be missing an assembly reference lol.
The interesting thing is that I swear I’ve done this before with no issue in a Customization, but I am having issues within a BPM.
I can make it harder if you want but I might get lynched
Let me know if you have issues with it. There are a few advanced gymnastics in there possible when we will need that in the core app. Still waiting to see if people stumble into them in the wild
Running this on a data directive for SYS_TASK table - alerts me by email when MRP starts/stops
String serv = this.Session.AppServerURL ;
message.Body = "<h1>MRP started in Camden: "+serv+"</h1><BR>MRP Started by "+user+" on "+start+"<BR>Please wait before using any MRP suggestions until the task has completed. You will be notified on completion.";
Also, if you keep blanking out your server address how the hell am I supposed to target you for attacks?
Sorry folks, this place is an after hours hang out in the lazy boy and I’ve had too many honey do’s with the holidays fast approaching. I have not forgotten you. I’ll see what I can determine about this URL property. It’s one of the few I have not added personally.
It looks like that session property is only set when called by a ‘Rich Client’ - The Shell or EWA base clients. It’s actually used for BPM on the client.
Can I brainstorm a work around with you? What are you trying to accomplish where you need this Url?
He’s trying to identify the current instance within a BPM for conditional logic
Pilot, vs Prod etc
I came up with a work around using DB_NAME() but that can open up a whole can of worms in the wrong hands so I won’t post the example here. Don’t want shoot yourself in the foot syndrome.
Maybe you have a better idea
Hi @Chris_Conn were you able to fix this? I’m also using the SysTask table to send emails when a process gets an error but when using the Session.APPServerURL the emails are not sent, if I remove it the emails are received.