Solved

2021 R1 Enable Locked Fields


Userlevel 5
Badge

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. 

icon

Best answer by Naveen Boga 16 June 2021, 18:33

View original

23 replies

Userlevel 2
Badge +1

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.  

Userlevel 4
Badge

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 

 

Userlevel 4
Badge

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

Userlevel 7
Badge +17

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.

 

Userlevel 7
Badge +17

@cshaheen26  Will check and let you know.

Userlevel 3
Badge +1

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!

Userlevel 7
Badge +17

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

Userlevel 3
Badge +1

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

Userlevel 7
Badge +17

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.

 

 

Userlevel 7
Badge +17

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

Userlevel 3
Badge +1

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

Userlevel 7
Badge +17

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

 

Userlevel 3
Badge +1

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

 

Userlevel 7
Badge +17

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);

}
}

 

Userlevel 3
Badge +1

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

 

 

Userlevel 6
Badge +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.

 

Userlevel 7
Badge +17

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

 

Userlevel 5
Badge

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). 

Userlevel 7
Badge +17

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

 

 

Userlevel 5
Badge

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.

 

Userlevel 7
Badge +17

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!!

Userlevel 5
Badge

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!

Userlevel 7
Badge +17

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

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 — 2023  Acumatica, Inc. All rights reserved