Hi,
Wandering in the dark here.
I want to check on the site/plant update whether the Quantity Bearing matches the part record. Trying some code on a condition, and getting an error on the save. Here's the code:
Â
bool NQBMismatch = false;
string PartNumber = "";
var ttPartPlantResult = (from row in ttPartPlant where row.Company == Session.CompanyID select new { row.PartNum }).FirstOrDefault();
if (ttPartPlantResult != null)
 {
var Part = (from Part_Row in Db.Part where Part_Row.Company == callContextClient.CurrentCompany && Part_Row.PartNum == ttPartPlant.PartNum select Part_Row).FirstOrDefault();
// more stuff here, set NQBMismatch = true if they don't match
 }
return NQBMismatch;
Â
It's when I add the red code that I get this error on save:
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.Part,int,bool>' does not take 1 arguments [Part.Update.cs(666,51)]Error CS1660: Cannot convert lambda expression to type 'string' because it is not a delegate type [Part.Update.cs(666,51)]Error CS1061: 'Erp.Tablesets.PartPlantTable' does not contain a definition for 'PartNum' and no extension method 'PartNum' accepting a first argument of type 'Erp.Tablesets.PartPlantTable' could be found (are you missing a using directive or an assembly reference?) [Part.Update.cs(666,117)]
Â
I've tried a number of ways to code the read from the Part table, but not the correct one yet. Ideas?
Thanks,
Joe
--
Joe D. Trent
Bigham Ag Equipment