The customer requested a checkbox on the 22R2 Task screen CR306020. It was easy enough to add but now I run into the old issue of allowing the field to be edited when the task is complete, as seen below:
I used several posts on the community to do this on other screens but they always start at the workflow or automation step.
The issue with this screen is there are no automation steps or workflows. I tried to add a workflow and it just spins forever.
Where should I start?
Page 1 / 1
Have you tried using PXUIFieldAttribute.SetEnabled<field> in RowSelected?
Sorry not a programmer, really wish I was.
Do you mean adding it to the field attributes like this:
No, this would be a code customization in a graph extension.
I’m not sure this would work, but it would be worth a shot. Add this as an attribute instead:
dPXUIEnabled(typeof(True))]
Thanks, will test tonight when I can publish.
Hi @michael73 For the COMPLETED documents, we should enable the fields from Code level as well as from the CODE as well.
Here is the article to enable the field for the completed status documents.
To add in graph extension do you mean in code, like this:
Thanks for the help!
Yes, @michael73 That is correct!
Thanks!
When I try to publish this in code:
using System; using System.Collections; using System.Linq; using PX.Common; using PX.Data; using PX.Data.EP; using PX.Objects.Common.GraphExtensions.Abstract; using PX.Objects.EP; using PX.SM; using System.Collections.Generic; using PX.Objects; using PX.Objects.CR;
namespace PX.Objects.CR { public class CRTaskMaint_Extension : PXGraphExtension<PX.Objects.CR.CRTaskMaint> { #region Event Handlers
PXUIFieldAttribute.SetEnabled<field>
#endregion } }
I get this error: \App_RuntimeCode\CRTaskMaint.cs(23): error CS1519: Invalid token '}' in class, struct, or interface member declaration
I think I’m missing the select row. Did I put the code together correctly or did I select the wrong class? I used PX.Objects.CR.CRTaskMaint
Hi @michael73 The below line is wrong in your code.
PXUIFieldAttribute.SetEnabled<field>
You should mention the actual field, which you wanted to enable.
Please refer to the above like, which I have provided. This code is already available.
After posting I realized I was missing a whole block but I am not enough of a programmer to put it all together.