I have a customization that I'm upgrading for Acumatica 2020R2 that did various work with Customers through a CustomerMaint graph instance.
As of 2020R2 it appears various Views have been changed in how they are implemented. Doing an Inspect Element on the controls in the screen still indicate the same View Names but reviewing CodeRepository\CustomerMaint.cs it is not clear how these Views are implemented anymore.
'CustomerMaint' does not contain a definition for 'Contacts' ...
'CustomerMaint' does not contain a definition for 'DefContact' ...
'CustomerMaint' does not contain a definition for 'Addresses' ...
'CustomerMaint' does not contain a definition for 'DefAddress' ...
'CustomerMaint' does not contain a definition for 'DefLocation' ...
'CustomerMaint' does not contain a definition for 'DefLocationContact' ...
How can I access these Views and DAC objects in 2020R2?
In versions of Acumatica prior to 2020 R2, CustomerMaint
inherits from BusinessAccountGraphBase
. Starting in 2020 R2, it directly derives from PXGraph
and many of the shared views needed to support the customer maintenance were moved to extensions that are mapped to properties of the graph such as DefContactAddressExt, DefLocationExt, ContactDetailsExt, LocationDetailsExt.
The views that you need are exposed by these extensions. An example of how you could retrieve the current address is from a graph extension is below:
var ext = Base.GetExtension<CustomerMaint.DefContactAddressExt>();
var address = ext.DefAddress.Current