Solved

Adding fields and custom action to Pick,Pack and Ship screen

  • 6 May 2022
  • 7 replies
  • 181 views

Userlevel 2
Badge

I need to customize the Pick, pack and ship screen with a custom action that uses a different criteria to select the next list. This also requires me to add custom fields to the header form in the screen.

I have looked at the source but find it is very different from other graphs, with a lot of inherited classes, generic graphs, references to implementations and common methods.

I have tried to extend the header DAC but end up with compilation errors that reference different classes than the ones listed while examining the screen. Which is the correct DAC to extend for the header?

Are the Graph and DACs customizable? Is there a sample reference or recommended overloadable methods to create custom actions?

icon

Best answer by Naveen Boga 22 May 2022, 09:01

View original

7 replies

Userlevel 3

What version of Acumatica are you customizing?  The WMS module was actually rewritten for 22R1, so that’s why it may be less straightforward to extend. It appears that most of the code for this is within the PX.Objects.SO.PickPackShip class, and contains mostly protected methods.  The DAC header view seems to be HeaderView.  What are you trying to extend in the DAC?  There are delegate methods for the Picked, Packed, etc. views that you could override if you want to change the content or order of those lists.

Userlevel 2
Badge

Hi @tlanzer25  this is for 21R2 (21.204.0055)

I’m trying to add a condition to pick lists for shipments with a specific flag, so it can be either a checkbox that turns that option on (only select lists from shipments with flag) or off (any lists) or a custom action that does this, something like “Next Special List”.

Userlevel 3

I’m not extremely familiar with the functionality behind this screen, but as I mentioned, you can likely override the Picked view delegate method which queries the ship lines, and add a condition to the query to only look for your new flag.

Userlevel 7
Badge +12

Hi @Marco Villasenor  I have customized Pick, Pack and Ship screen with custom fields and Custom Action.

I’m not sure whether this helps you but here is what I have done.

  • Introduced 2 custom fields i.e. Test A and Test B along with Custom Action i.e. Test Button.
  • As a sample, when I click on that Test Button, it will show the sum of those custom fields.
  • If you are looking for this, please let me know will share the code with you.

 

 

Userlevel 2
Badge

Hi @Naveen Boga of you could that would be great.

 

You can share it as a link to a gust here ori can send you a message with my contact information.

Userlevel 7
Badge +12

Hi @Marco Villasenor  Please find the 21 R2 customization code for your reference.

 

Hope this helps!

 public class HeaderExt : PXCacheExtension<ScanHeader>
{
//PickPackShipHost

[PXDecimal()]
[PXUIField(DisplayName = "Test A")]
[PXDefault(TypeCode.Decimal, "0.0")]
public decimal? UsrA { get; set; }
public abstract class usrA : PX.Data.BQL.BqlDecimal.Field<usrA> { }

[PXDecimal()]
[PXUIField(DisplayName = "Test B")]
[PXDefault(TypeCode.Decimal, "0.0")]
public decimal? UsrB { get; set; }
public abstract class usrB : PX.Data.BQL.BqlDecimal.Field<usrB> { }
}

public class PickPackShip_Extension : PXGraphExtension<PX.Objects.SO.WMS.PickPackShip.Host>
{
#region Event Handlers

public PXAction<ScanHeader> TestButton;
[PXButton, PXUIField(DisplayName = "Test Button")]
protected virtual void testButton()
{
throw new PXException("Sum :" + (Base.WMS.HeaderView.Current.GetExtension<HeaderExt>().UsrA + Base.WMS.HeaderView.Current.GetExtension<HeaderExt>().UsrB));

}

#endregion
}

 

 

 

Userlevel 1

@Marco Villasenor @Naveen Boga I am working on this screen and need to add some DB fields but not able to find the right table where i can add those columns any idea regarding that ?

 

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