I'm working on a data directive for maintaining a list within the UDCodes table, and I’m asking for help with the appropriate Epicor and/or BO calls, to create a new UDCodes record. It needs to be in C# code, because the list of records to be created is in a C# List. I have an example of code where an entry is added to the UD12 table based on this “GetService” setup…
using(var svc = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD12SvcContract>()) {
...then a record is created in code and we see
ds.UD12.Add(UD12);
BOUpdErrorTableset boUpdateErrors = svc.UpdateExt(ref ds, false, true, out errorOccurred);
...but when I put the service renderer GetService “using” statement in my directive, I get the error message saying “CS0234 The type or namespace name 'UD12SvcContract' does not exist in the namespace 'Ice.Contracts' (are you missing an assembly reference?)” In the code design window there is a button for Usings & References; can anyone advise me on what to put in there for the similar calls for the UDCodes table? Or even for this one for UD12?
I know there are multiple ways to create records in a C# directive, and don’t have a recent working example of code that would create a record in the database, except for UDXX tables which the examples tell me are simpler to work with than other table entries.
Any ideas on how I could add a record to the UDCodes table in C# code, would be much appreciated.
Thanks much,
...Monty.
Best answer by mwilson
View original