How do I access the extension of the ARTran table to access a custom field in that table?

  • 29 March 2023
  • 2 replies

Userlevel 4


I have added a custom field to the ARTran table but I am getting an error when trying to access the extension of this table to update this custom field via code.

I imagine I need to replace ‘ARTran’ with something else, but not sure what it would be.

Here is the code I am currently using to access this extension:

var row = (ARTran)e.Row;
ARTran rowExt = row.GetExtension<ARTran>();

And here is the error I get:

\App_Code\Caches\ARInvoiceEntry.cs(55): error CS0311: The type 'PX.Objects.AR.ARTran' cannot be used as type parameter 'TExtension' in the generic type or method 'PXCacheEx.GetExtension<TExtension>(IBqlTable)'. There is no implicit reference conversion from 'PX.Objects.AR.ARTran' to 'PX.Data.PXCacheExtension'.

What do you suggest I replace ARTran with to access the custom field via the extension?


Kind regards,



Best answer by aaghaei 29 March 2023, 04:01

View original

2 replies

Userlevel 7
Badge +9
var row = (ARTran)e.Row;
ARTranExt rowExt = row.GetExtension<ARTranExt>();
Userlevel 4

Hi Reza,

Thanks so much for that, completely forgot about adding that ‘Ext’ bit on the end, I’ll make sure to remember that for next time.

Kind regards,



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