The name 'IceContext' does not exist in the current context

I am trying to code a button of a form customization. I will need to modify records in the database.
This is what I have so far and am getting the error in subject of this topic.

Can I do this from a form customization, or does this only work from a BPM?

If I have to open a BPM form, how can I do this using a button on the Job Entry Form?

This is for BPMs only, please refer to the Customization Guide in EpicWeb to learn how to do this in a customization.

Correct - IceContext is the wrapper for all the database goo. Not too many db activities happening in the client…

Thanks Jose and Bart!

I am in a customization (not a BPM) and want to connect to the Db. and get all tables; like:


What do I need to call in order to execute a query like this in form customization?
string jobnum = “123”;
var query = (from JobAsmbl in Db.JobAsmbl
join Parts in Db.Part
on new { JobAsmbl.Company, JobAsmbl.PartNum }
equals new { Part.Company, Part.PartNum }
JobAsmbl.JobNum == jobnum &&
Part.ProdCode == “CONF”
select new

Nacy as I mentioned in your previous post this is only for BPMs you cannot instantiate the Db context at the customization level (nor do you want to). In a Server / Client model DB operations should be restricted to the server side.
Use the Adapters , and Business oBjects to run BAQ’s and get the data you need in the customization.
There are countless examples on this site on how to do that as well as walk through examples available in the Customization Guide in EpicWeb.

1 Like

Thanks Jose; this is slowly becoming clearer. I appreciate your help.

1 Like