We have added a field to APInvHed called PayrollDate_c. We use it for some validations on the lines when an invoice is for one of the temp agencies we work with. Trying to validate when a line on an AP Invoice is entered for one of these suppliers that the PayrollDate field has been populated. Tried a couple things using the objects available in the Method Directives but ended up having no luck and went with code.
PayrollDate = (from APInvHedRow in Db.APInvHed where APInvHedRow.InvoiceNum == InvNum select APInvHedRow.PayrollDate_c).FirstOrDefault();
works fine. No issues.
PayrollDate = (from APInvHedRow in ttAPInvHed where APInvHedRow.InvoiceNum == InvNum select APInvHedRow.PayrollDate_c).FirstOrDefault();
errors telling me that PayrollDate_c field is not available in ttAPInvHed.
If I want to query it in method, it does:
It just doesn’t exist if I want to pull the data from it. Am I missing something obvious?