Skip to main content
Solved

How to enable the customized fields when a document is completed.


Forum|alt.badge.img+5
  • Captain II
  • 398 replies

Hello,

        I learned from others that in previous Acumatica version , the fields can be enabled in “automation steps”. But I am using 2020R2, the steps of shipments are no longer allowed to use.
      I can only use “workflow and state”.

        But it does not work out, the fields are still disabled.

   

 

 

 

        Does anybody know another way to enable the customized fields and allow updating?

Best answer by Naveen Boga

Hi @ray20 

 

In 20 R2, since the Automation steps are de-activated by default and NOT able to activate, Can you please add below RowSelected event and verify..

 

public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {
        protected virtual void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOShipment row = e.Row as SOShipment;
            if (row != null)
            {
                Base.Document.Cache.AllowUpdate = true;

                PXUIFieldAttribute.SetEnabled<SOShipmentExt.usrTestField>(cache, row, true);
            }
        }
    }

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

6 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • Answer
  • May 10, 2021

Hi @ray20 

 

In 20 R2, since the Automation steps are de-activated by default and NOT able to activate, Can you please add below RowSelected event and verify..

 

public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {
        protected virtual void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOShipment row = e.Row as SOShipment;
            if (row != null)
            {
                Base.Document.Cache.AllowUpdate = true;

                PXUIFieldAttribute.SetEnabled<SOShipmentExt.usrTestField>(cache, row, true);
            }
        }
    }


Forum|alt.badge.img+5
  • Author
  • Captain II
  • 398 replies
  • May 10, 2021
Naveen B wrote:

Hi @ray20 

 

In 20 R2, since the Automation steps are de-activated by default and NOT able to activate, Can you please add below RowSelected event and verify..

 

public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {
        protected virtual void SOShipment_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOShipment row = e.Row as SOShipment;
            if (row != null)
            {
                Base.Document.Cache.AllowUpdate = true;

                PXUIFieldAttribute.SetEnabled<SOShipmentExt.usrTestField>(cache, row, true);
            }
        }
    }

 

Yes, code master. Thank you so much. I just did, it works.
Fantastic,  you are the best.


Forum|alt.badge.img+5
  • Author
  • Captain II
  • 398 replies
  • May 10, 2021

@Naveen B 
Hello, and to who are also interested

I have verified that, both the “modify in either automation steps or in workflow” and “codes in rowselect” are needed to enable the fields.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • May 10, 2021

Yes @ray20  Acumatica is disabling the fields in the code level as well as Automation Steps/Workflow once the document is changed to “Completed” status

 


Forum|alt.badge.img
  • Freshman II
  • 28 replies
  • September 6, 2021

Unfortunately the same scenario didn’t worked out for me in case of SOLine DAC

I want to enable custom field in SOLine and SOShipLine DAC. Can anyone show us the directions.

Thanks


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3417 replies
  • September 6, 2021

Hi @sd79  You need to enable the field from Workflows as well as you need to have the below code.

You can refer this link if you have any doubts.

 

public class SOShipmentEntryExt : PXGraphExtension<SOShipmentEntry>
    {
        protected virtual void SOShipLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOShipLine row = e.Row as SOShipLine;
            if (row != null)
            {
                Base.Document.Cache.AllowUpdate = true;
Base.Transactions.Cache.AllowUpdate = true;

                PXUIFieldAttribute.SetEnabled<SOShipLineExt.usrTestField>(cache, row, true);
            }
        }
    }


public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
    {
        protected virtual void SOLine_RowSelected(PXCache cache, PXRowSelectedEventArgs e, PXRowSelected InvokeBaseHandler)
        {
            InvokeBaseHandler?.Invoke(cache, e);
            SOLine row = e.Row as SOLine;
            if (row != null)
            {
                Base.Document.Cache.AllowUpdate = true;
Base.Transactions.Cache.AllowUpdate = true;

                PXUIFieldAttribute.SetEnabled<SOLineExt.usrTestField>(cache, row, true);
            }
        }
    }


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