Skip to main content
Solved

2021 R1 Enable Locked Fields


Michaelh
Semi-Pro II
Forum|alt.badge.img+1

How do I enable locked fields, like we used to in Automation Steps? I’m seeing it’s under Customizations now, but I am not seeing a useful walkthrough on this. I want to unlock a date filed on the SO Header when a shipment is created. 

Best answer by Naveen Boga

Hi @Michael Hansen Sorry… That was my bad. I have given an example from 2020 R1.

We can even enable the fields in 2021 R1 using workflow mechanism and I have enabled “Order Date“ field when Sales Order is in Shipping status.

Below are the steps and  hope this help!!

 

Order Date field enabled in Shipping Status

 

 

View original
Did this topic help you find an answer to your question?

26 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • June 16, 2021

HI @Michael Hansen  You wanted to change the Sales Order date field, when Sales Order is in “Shipping” status?


Michaelh
Semi-Pro II
Forum|alt.badge.img+1
  • Author
  • Semi-Pro II
  • 185 replies
  • June 16, 2021

Among other fields yes. Right now, all my dates get locked once a shipment is created, I want to be able to modify those dates. This used to be handled through automation steps. If anyone knows how or has a guide I can use, that’d be aces!


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • June 16, 2021

As soon as shipment created and Sales Order will be moved to the “Shipping” and all the document fields will go the non-editable mode.

To enable these fields, we need handle in 2 place.

  • Code Level
  • Automation Steps screen level

 

Code Level: We need have a Row_Selected event to enable fields. please find the sample code below.

protected virtual void SOOrder_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOOrder row = e.Row as SOOrder;
            if (row != null)
            {  
                    PXUIFieldAttribute.SetEnabled<SOOrder.Date>(cache, row, true);

            }
        }

Automation Steps: Please find the screenshot for reference.

Hope this helps!!


Michaelh
Semi-Pro II
Forum|alt.badge.img+1
  • Author
  • Semi-Pro II
  • 185 replies
  • June 16, 2021

Is this correct? I was told Automation Steps are now deprecated in 2021 R1. I say this because those are the steps I’ve used previously, but they are no longer working. Here is what Automation Steps says:

 

 

 

I have been informed by my VARs that all this is handled in Customizations, but it seems my VARs have no idea how to do it. This is mission critical for our team, any help is GREATLY appreciated.

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • Answer
  • June 16, 2021

Hi @Michael Hansen Sorry… That was my bad. I have given an example from 2020 R1.

We can even enable the fields in 2021 R1 using workflow mechanism and I have enabled “Order Date“ field when Sales Order is in Shipping status.

Below are the steps and  hope this help!!

 

Order Date field enabled in Shipping Status

 

 


Michaelh
Semi-Pro II
Forum|alt.badge.img+1
  • Author
  • Semi-Pro II
  • 185 replies
  • June 16, 2021

If you’re ever in Oregon, I owe you a beer good sir! I found the workflows, but didn’t think to make a new one (which explains all my greyed options). 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • June 16, 2021

LOL 🙂 BTW… I’m from India… I'm happy that I helped you on this :) 

 


Joe Schmucker
Captain II
Forum|alt.badge.img+3

This question relates to 2021.  I actually do have the same type of question but it actually is for 2020 R2.  I am going to post another question to the forum which is basically the same as @Michael Hansen’s but since this thread has been “answered” I want to see if I can get my question in 2020 R2 with an Automation Step.

 


Forum|alt.badge.img
  • Jr Varsity II
  • 65 replies
  • November 30, 2021

Hi @Naveen B , I’m trying to follow your steps to unlock the Customer Order Nbr field on the SO Invoice screen after the invoice has been Released (in Open status). Below are my settings in my customization package but it’s not working. Could you take a look and help me see what I’m missing?

 

Selections for Adding New Workflow

 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • November 30, 2021

Hi @cshaheen26  The workflow configuration is looks good to me.

Apart from this, we also need to enable from code level, then only fields will be enabled on the screen. Here is code and screenshots for your reference.

 

 

 



protected virtual void ARInvoice_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            ARInvoice row = e.Row as ARInvoice;
            if (row != null)
            {  
                    PXUIFieldAttribute.SetEnabled<ARInvoice.invoiceNbr>(cache, row, true);

            }
        }

 


Forum|alt.badge.img
  • Jr Varsity II
  • 65 replies
  • November 30, 2021

Hi @Naveen B, unfortunately that Code is failing the Validation.
 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • November 30, 2021

Hi @cshaheen26 It seems that you have done something wrong, can you please attach that customization package here.

 


Forum|alt.badge.img
  • Jr Varsity II
  • 65 replies
  • November 30, 2021

@Naveen B here ya go. This package does not include the Code you suggested yet.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • November 30, 2021

Okay @cshaheen26  Will check and will share the new package here.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • November 30, 2021

Hi @cshaheen26 I have modified your package and it is working as expected now. 

Please find the attached package and screenshot for your reference.

 

Let me know if this is working for you as well.

 

 


Forum|alt.badge.img
  • Jr Varsity II
  • 65 replies
  • November 30, 2021

@Naveen B You are the BEST!! Thank you so much :)


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • November 30, 2021

 Thank You! @cshaheen26  I'm glad that I helped you on this :)


Forum|alt.badge.img
  • Jr Varsity II
  • 65 replies
  • January 28, 2022

Hi @Naveen B I’m trying to enable a custom field after the invoice has been released. I tried copying the package you previously sent me but my package fails validation noting that the custom field does not exist in the table. Do I maybe need to split my configuration into 2 packages?

Attached is my package I’m working on.

I appreciate any and all suggestions/help!


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • January 29, 2022

@cshaheen26  Will check and let you know.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • January 29, 2022

Hi @cshaheen26  I have modified your customization and I can able to EDIT the custom field even after releasing the Invoice document.

Attached screenshot and customization package for your reference.

 


Forum|alt.badge.img+1
  • Semi-Pro I
  • 177 replies
  • November 15, 2022
Naveen Boga wrote:

Hi @cshaheen26  I have modified your customization and I can able to EDIT the custom field even after releasing the Invoice document.

Attached screenshot and customization package for your reference.

 

Hi Naveen, I know this post is relatively old, but I got the following error while trying to follow along.

I want to enable the External Reference number on the Open, Pending Approval and Awaiting Payment status.
I added them in the Workflow Engine, but trying to use the code structure you gave leads to this error:
 

Any Idea of what I am doing wrong. I tried edCustomerRefNbr as well.
If I check with Inspect Elements or even on the field within the Customization package the format should be SOOrder.CustomerRefNbr


Forum|alt.badge.img+1
  • Semi-Pro I
  • 177 replies
  • November 16, 2022
krausef77 wrote:
Naveen Boga wrote:

Hi @cshaheen26  I have modified your customization and I can able to EDIT the custom field even after releasing the Invoice document.

Attached screenshot and customization package for your reference.

 

Hi Naveen, I know this post is relatively old, but I got the following error while trying to follow along.

I want to enable the External Reference number on the Open, Pending Approval and Awaiting Payment status.
I added them in the Workflow Engine, but trying to use the code structure you gave leads to this error:
 

Any Idea of what I am doing wrong. I tried edCustomerRefNbr as well.
If I check with Inspect Elements or even on the field within the Customization package the format should be SOOrder.CustomerRefNbr

Disregard. The issue was SOOrder.CustomerRefNbr needs to be lower case when in <> brackets.

SOOrder.customerRefNbr 

 


Forum|alt.badge.img

I know this is an old post, but I am curious as to why the need for both code and workflow?  Isn’t the point of workflow to be a no code solution?  It also seems redundant to enable it using workflow and code.  


  • Freshman II
  • 13 replies
  • July 11, 2024

Hi! 

I am being charged 5000 to enable my invoice screen to update the default sales person on an invoice once the invoice is released. Salesperson getting credit changes all the time! 

 

It looks like it should be a straight forward workflow change. I do not have the ability to code myself in ACUMATICA but this seems like highway robbery. Thoughts? 


Joe Schmucker
Captain II
Forum|alt.badge.img+3

Hi,@livl Sometimes what looks like a simple change is not so simple.  Based on your basic description of what you are asking, it doesn’t seem too hard.  However, there are some situations where a work flow cannot do what you need and code is required.  It may only be 5 lines of code...but it just might not be possible with a workflow.  I’ve seen this quite a bit.

Regarding the fee to do the customization, I’ve never seen anyone post in this forum anything about pricing for customizations.  I think it is kind of a taboo subject as many members of the forum do it for a living.  However, that being said, did you mean to type 5K?  Or is that a typo? 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings