Hello,
I’ve created code to overwrite a protected method called Bill in the contract billing class, by extending the CTBillEngine graph.
This is quite an involved method which calls out to other protected methods within the same CTBillEngine class. I’ve used [PXProtectedAccess] to create abstract methods, so I can call the protected methods and this is working great.
One of the protected methods references a field which is defined in the following way:
protected Dictionary<int?, decimal?> availableQty = new Dictionary<int?, decimal?>();
I know how to access protected properties and methods in a base class using the PXProtectedAccess attribute, but how can I access a protected field from an extended class?
In standard c# this is simple, the inherited class has automatic access to a protected field, but this isn’t the case with the Acumatica framework. I’ve tried using PXProtectedAccess on a field but it displays a message saying PXProtectedAccess is only valid on ‘class, method, property and indexer declarations’.
I’m stuck now, does anyone know how to do this please?
Thanks
Steve