I have several custom fields on the Cost Budget tab of the Projects screen. 5 of them are stored in the DB and they are working great.
My issue is getting a non bound field to display a value in the grid. I want to pull the Task Description field from the PMTask table and display it.
I debugged the rowselected event on the PMCostBudget cache and there is a correct value in the PMCostBudget.projectTaskID field.
public class ProjectEntry_Extension : PXGraphExtension<PX.Objects.PM.ProjectEntry>
{
#region Event Handlers
protected void PMCostBudget_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
var row = (PMCostBudget)e.Row;
//PMCostBudget.projectTaskID = 1697
}
#endregion
}
The DAC extension for this field is as follows
public class PMBudgetExt : PXCacheExtension<PX.Objects.PM.PMBudget>
{
Not showing the 5 db fields here for brevity - they work fine.
#region UsrTaskDescription
[PXString(250, IsUnicode = true)]
[PXUIField(DisplayName = "Task Description", Enabled = false)]
[PXDefault(typeof(Select<PMTask, Where<PMTask.taskID, Equal<Current<PMCostBudget.projectTaskID>>>>), SourceField = typeof(PMTask.description), PersistingCheck = PXPersistingCheck.Nothing)]
public virtual string UsrTaskDescription { get; set; }
public abstract class usrTaskDescription : PX.Data.BQL.BqlString.Field<usrTaskDescription> { }
#endregion
}
I am trying to get the description field as shown in the PXDefault above.
Is there something wrong with the code? It looks like it should do what I want, but the grid shows a blank field