Unable to find assembly "Ice.Core.Session"

Hi guys,
I’m new to EPICOR, but not new to C# coding. I’m having a hard time trying to move from the .NET world to EPICOR’s world of magical code behind the scenes… I’m simply trying to access the Session.CompanyID (or even the CallContextClientData.CurrentCompany) in a Customization to filter out some of our companys when I set EpiCombo default values. But when I test the code in the Customization window I get the error Error: CS0234 - The type or namespace name ‘Core’ does not exist in the namespace ‘Ice’ (are you missing an assembly reference?). I’ve seen several code examples on this site that use “Ice.Core.Session” so I’m a bit lost. I’m referencing Ice.Core in a using as shown here:

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;
using Ice.Core;

I could use some of you’re expert advice here… Thanks!

Welcome to the mysterious black-box world of Epicor coding …!

Not everything you’d think would be referenced is in fact referenced. You’ve got the right "using"s here, but you may need to go to Assembly Reference Manager (from the “Tools” menu) to actually make sure they’re in place to be used.

usually it is exist by default under the native assembly of all UI, what screen are you using ?

I’m customizing a BPM data entry form (UI.InfoPrompt.IP_QuoteEntryLine). When I open Custom Assembly Reference Manager here’s what I see under Native Assemblies:
image

Basically I only see Ice.UI.InfoPromptForm.

Click “Add Custom Reference” and add Ice.Core.Session.dll. I think it should default you to the correct folder, thought you may have to remove the file type filter.

1 Like

I normally add the Ice.Core.Session.dll in the Custom Reference, but there are instances where I added and it still says missing reference and then I have noticed that for some reason the dll added the namespace is lower case instead.

So I exported the Customisation and change the case in the XML file then reimport again.

I found Ice.Core.Session.dll, it was me not noticing the filter on the extensions! Details, details… Thanks for all your quick help!