Trying to calculate a date by simply adding two(2) days from another field. The code below does not work because it says DateAdd does not exist in the current context. When you try to add anything, it says that DataTime fields cannot use opperand like +
Here is the code that is failing:
protected void PMProject_UsrClearPanelsOrdered_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (PMProject)e.Row;
if (cache.GetValue(row, "UsrClearPanelsOrdered") != null)
{
DateTime estimated = (DateTime)cache.GetValue(row, "UsrClearPanelsOrdered");
cache.SetValue<ContractExt.usrStuccoDateUpdate>(row, DateAdd(estimated, 'd', 2));
}
}