VS2019 External app saving to LaborDtl using BO

Hello,

An old program was designed by a person no longer with us, in VS 2019. It is writing to laborDtl using the BO.
We added a new field to write to CommAssig_c.
We are unsure how to add this new field into the VS app. In my long ago use of VS (2010) there were a xsd file containing all the TableAdapters , I would just delete and readded the table.

But here I do not see that. So I am unsure how to do it. I saw some autogenerated code pertaining to the fields available to write to, but I am unsure how to regenerate it.

Can any one advise me where to look?

Thank you.

I assume you need to re-import the web service reference to get the updated schema

The web service?
can you elaborate how to test this?
But yes I need to refresh the LaborDtl setup…

tks
Pierre

If it is an external application, I assume he was utilizing the WCF web services. These would need to be re-imported after a schema change.
I don’t have a WCF app readily available, but to reimport your references you do should be able to go to the web references folder, right click on the LaborDtlSvc, and click Update Web Reference.

1 Like

Is there an EDMX file anywhere? If so might have to rebuild the data model if that method was used at all.

1 Like

No such file.

The references to the Epicor are as follows:
image

I go view into Erp.Contracts.BO.Labor and I see under erp.Tablesets the LaborDtlRow fields.

I guess I need to refresh this list to see my new UDField…

In the code it is declared like this:

 laborBO = WCFServiceSupport.CreateImpl<LaborImpl>(session, ImplBase<LaborSvcContract>.UriPath);
var ds = new LaborDataSet();
ds = laborBO.GetByID(headerSeq);

 laborBO.GetNewLaborDtlWithHdr(ds, from.Date, (decimal)from.TimeOfDay.TotalHours, to.Date, (decimal)to.TimeOfDay.TotalHours, headerSeq);
var warning = string.Empty;
            laborBO.DefaultJobNum(ds, operation.JobNum);
            laborBO.DefaultAssemblySeq(ds, operation.AssemblySeq);
            laborBO.DefaultOprSeq(ds, operation.OprSeq, out warning);
            if (!string.IsNullOrWhiteSpace(warning))
                throw new Exception("OprSeq - " + warning);
            laborBO.DefaultResourceID(ds, resource);
            
			laborBO.CheckWarnings(ds, out warning);
			if (!string.IsNullOrWhiteSpace(warning))
				throw new Exception("Check - " + warning);
			laborBO.Update(ds);
            
            var row = ds.LaborDtl[ds.LaborDtl.Count - 1]; 

row does not have the new UDField. that is the issue.

Is the solution outside of VS and into Epicor to refresh LaborImpl somehow?

That’s the class within the BO it will never know about your UD field. It will only know about Native fields. I’m not sure if you can maybe use the .UDField method from there like in BPM land but I’m not sure.

Psst. Psst. Hey Buddy. Over here. C’mon over.

(Pierre cautiously walks over. I whisper to him in a gangster voice)

Have I ever mentioned REST? Or better yet, Epicor Functions? Yeah, that’s the ticket. It clears up all of these kinds of problems, see? Works with Kinetic too. And for you, free of charge.

:wink:

Yeah I know…
But I know nothing Mark Wonsil !!! :wink:

I am sure it is something simple… I am so close to resolve this (and do not not how…) …

Going Rest is another Rhealm I am not yet knowledgeable about … but should… but I miss time for now… ahhhhgh…

1 Like

I think you can access it using
row["CommAssig_c"] = someValue;

If column CommAssig_c does not exist it will throw an exception.

Brett