Does anyone know of any existing functionality around archiving projects that are no longer active? I’d like to be able to archive/inactivate them to the point that they do not show up on search lists when using the search bar.
Solved
Archiving Projects
Best answer by noorula77
Override your field on screen level and add below mentioned code:
[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXRestrictor(typeof(Where<DACName.isActive, Equal<True>>), "Only active records are allowed")] // Restrictor to filter by isActive
OR
[PXSelector( typeof(Search<Project.contractID, Where<Project.isActive, Equal<True>>>), typeof(Project.contractCD), typeof(Project.description), SubstituteKey = typeof(Project.contractCD), DescriptionField = typeof(Project.description))] [PXRestrictor(typeof(Where<Project.isActive, Equal<True>>), "Only active projects are allowed")]
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.