Solved

Make a Custom Field Available on All Workflow Steps

  • 18 August 2021
  • 3 replies
  • 395 views

Badge +1

I’ve created a new dropdown field for the SOLine “Return Reason” but am unable to edit this field when the Sales Order status is Completed (because the workflow step prevents it). Even after Re-opening the order I’m unable to edit the SOLine that is completed including this field.

So I tried adding a new workflow:

Modifying the Open and Backorder step (the act of re-opening a Completed order puts it in the Open/Backorder status) by adding the Return Reason:

 

But the field still stays locked:

 

Am I missing something with the workflow editor?
Is there a simple parameter I can add to the DAC field?

icon

Best answer by Naveen Boga 20 August 2021, 15:13

View original

3 replies

Userlevel 7
Badge +17

Hi @abahar14  I worked on this and I’m able to able modify the field when Order status is in Completed/Shipping/Cancelled as well.

The thing is apart from workflow changes also we need to have small piece of code to enable this field. I have attached code and screenshots for reference.

 

 public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntry>
{
#region Event Handlers

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.usrReturnReason>(cache, row, true);
}
}

#endregion
}

 

 

 

Badge +1

Thank you Naveen! Acumatica support also confirmed that coding is necessary here as some screens are controlled by code and workflows… SO screen being one.

I’ve added an idea so that this code can be generated automatically as part of the workflow customization if people would like to vote for it:

 

Userlevel 7
Badge +17

Thanks for the update @abahar14 and voted 🙂

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