Additional GS1 codes support in Acumatica

Viewed 94

We need to add support for GS1 Barcode Customer Part Number in the Purchases - Receive and Put Away screen, it is not supported by default and I can't a find a way to add it.

From looking at the source code, it seems like I need to override GS1Support property or the GetGS1ApplicationSteps() method on PX.Objects.PO.WMS.ReceivePutAway class but I can't find a way to to this. I tried to override using PXGraphExtension method:

public class ReceivePutAway_Extension : PXGraphExtension<ReceivePutAway>
{
      
}

but then I get the following error:

CS0311 The type 'PX.Objects.PO.WMS.ReceivePutAway' cannot be used as type parameter 'Graph' in the generic type or method 'PXGraphExtension'. There is no implicit reference conversion from 'PX.Objects.PO.WMS.ReceivePutAway' to 'PX.Data.PXGraph' class.

UPDATE:

After updating the extension class declaration as suggested, now the error is gone but I'm still unable to find a way to override GetGS1ApplicationSteps() method on the BLC extension class PX.Objects.PO.WMS.ReceivePutAway, .

Does anybody know how to make the override work for a class like this or maybe has good suggestion on how to add support for additional GS1 barcodes?

1 Answers

ReceivePutAway is not a Graph, therefore you cannot do a simple Graph Extension directly on it. ReceivePutAway inherits from WMSBase which is actually defined as a Graph Extension. This means that you need to end up with a second level graph extension.

If you need to customize ReceivePutAway, I would suggest to try the approach mentioned here: https://help-2021r1.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=c86fdae8-fef9-4490-aa57-3528d0fa172e

Refer to section 'Second-Level BLC Extension' in the above link. In your case, it might be something like this:

 public class ExtensioReceivePutAway_Extension :
      PXGraphExtension<ReceivePutAway, ReceivePutAwayHost>
    {
    }
Related