Hi everyone,
I'm customizing the existing TaskID field from the POLine DAC on the Subcontract screen (SC301000) to allow selecting tasks belonging to completed projects.
Currently, when I remove the hold from a subcontract, I receive the following error:
The {0} project is completed.
Customization Code
public class SubcontractEntry_Extension
: PXGraphExtension<SubcontractEntry>
{
[PXDefault(
typeof(Search<PMTask.taskID,
Where<PMTask.projectID,
Equal<Current<POLine.projectID>>,
And<PMTask.isDefault, Equal<True>>>>),
PersistingCheck = PXPersistingCheck.Nothing)]
[PXRemoveBaseAttribute(
typeof(ActiveOrInPlanningProjectTaskAttribute))]
[PXDimensionSelector(
"PROTASK",
typeof(Search<PMTask.taskID,
Where<PMTask.projectID,
Equal<Current<POLine.projectID>>>>),
typeof(PMTask.taskCD),
typeof(PMTask.taskCD),
typeof(PMTask.description),
typeof(PMTask.status),
DescriptionField = typeof(PMTask.description))]
protected virtual void POLine_TaskID_CacheAttached(
PXCache cache)
{
}
}I tried Merge, Append, and Replace with PXMergeAttributes, but none resolved the issue.
The field now appears as a selector, but the existing value is not displayed, and the selected value disappears after refreshing the screen.
Any suggestions or working examples would be greatly appreciated.
Thank you!