I have a ud field added to the Company Table called QotTermsAndConditions_c.
I also added a UD field to the QuoteHed table called TermsAndConditions_c
I created a Method BPM on Quote.Update and added a preprocess BPM.
I tried to use the BO to create a dataset but I was getting an error that was pointing to some kind of address method that I was not using.
So I thought OK let me do this as a C#. However I am getting an error there as well. If anyone could spot my error I would greatly appreciate the help.
Here is the code I have now:
Erp.Tables.Company Company;
foreach(var ttQuoteHed_xRow in ttQuoteHed)
{
var ttQuoteHedRow=ttQuoteHed_xRow;
if(ttQuoteHed_xRow != null)
{
Company=(from Company_Row in Db.Company where Company_Row.Company==ttQuoteHedRow.Company select Company_Row).FirstOrDefault();
if(Company != null)
{
ttQuoteHedRow[“TermsAndConditions_c”] = Company[“QotTermsAndConditions_c”];
}
}
}
and when I try to save the code - I get an error message:
Server Side Exception
There is at least one compilation error.
Exception caught in: Epicor.ServiceModel
Error Detail
Description: There is at least one compilation error.
Details:
Error CS1593: Delegate ‘System.Func<Erp.Tables.Company,int,bool>’ does not take 1 arguments [Update.Pre.TermsAndConditio.cs(97,43)]
Error CS1660: Cannot convert lambda expression to type ‘string’ because it is not a delegate type [Update.Pre.TermsAndConditio.cs(97,43)]
Error CS1061: ‘Erp.Tables.Company’ does not contain a definition for ‘Company’ and no extension method ‘Company’ accepting a first argument of type ‘Erp.Tables.Company’ could be found (are you missing a using directive or an assembly reference?) [Update.Pre.TermsAndConditio.cs(97,61)]
I know there is something special about the Company table - I just don’t remember the specifics.
Thanks,
DaveO
Ph: 651-246-3281