Skip to main content
Answer

Can't override CreateShipmentIssue in SOOrderEntry

  • November 6, 2024
  • 1 reply
  • 45 views

Forum|alt.badge.img

 

Unable to override the CreateShipmentIssue

Best answer by Django

Your override must have the same declaration in terms of parameters.

This is how the override for CreateShipment looks (as of 24r1):

public delegate IEnumerable CreateShipmentDelegate(PXAdapter adapter, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation);
[PXOverride]
public IEnumerable CreateShipment(PXAdapter adapter, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation, CreateShipmentDelegate baseMethod)
{
//code to run before base code goes here
return baseMethod(adapter, shipDate, siteID, operation);
//code to run after base code goes here
}

 

1 reply

Forum|alt.badge.img+7
  • Captain II
  • Answer
  • November 6, 2024

Your override must have the same declaration in terms of parameters.

This is how the override for CreateShipment looks (as of 24r1):

public delegate IEnumerable CreateShipmentDelegate(PXAdapter adapter, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation);
[PXOverride]
public IEnumerable CreateShipment(PXAdapter adapter, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation, CreateShipmentDelegate baseMethod)
{
//code to run before base code goes here
return baseMethod(adapter, shipDate, siteID, operation);
//code to run after base code goes here
}