Question

Enabling a custom field in a completed task


Userlevel 3
Badge

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?

 


 


11 replies

Badge +11

Have you tried using PXUIFieldAttribute.SetEnabled<field> in RowSelected?

Userlevel 3
Badge

Sorry not a programmer, really wish I was.

Do you mean adding it to the field attributes like this:

 

Badge +11

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:

[PXUIEnabled(typeof(True))]

 

Userlevel 3
Badge

Thanks, will test tonight when I can publish.

Userlevel 7
Badge +17

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.

https://asiablog.acumatica.com/2021/10/enable-customization-fields-when-document-is-completed.html

 

Let me know if you need any assistance.

 

Hope this helps!

 

Userlevel 3
Badge

To add in graph extension do you mean in code, like this:

Thanks for the help!

Userlevel 7
Badge +17

Yes, @michael73  That is correct!

Userlevel 3
Badge

Thanks!

Userlevel 3
Badge

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

Userlevel 7
Badge +17

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.

Userlevel 3
Badge

After posting I realized I was missing a whole block but I am not enough of a programmer to put it all together.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved