Skip to main content
Answer

How do I get the DAC extension to the main document from an event on a transaction field?

  • January 27, 2023
  • 2 replies
  • 425 views

Forum|alt.badge.img+1

I have created a custom field on the Adjustment screen which I want to use to override the default location when adding an inventory item in the details tab.

How do I reference the extension to get the custom field from the summary section from an event (INTran_InventoryID_FieldUpdated) in the details section?

I am used to using the following to get the extension:

INRegisterExt iNRegisterExt = PXCache<PX.Objects.IN.INRegister>.GetExtension<INRegisterExt>(row);

but row is referring to the detail row and not the summary section. What do I put instead of row?

I hope this isn’t confusing and thanks for any help you can provide,

Phil

Best answer by andriikravetskyi35

Hi, 

except row, paste current value of DAC of INRegister table, like this:

INRegisterExt iNRegisterExt = PXCache<PX.Objects.IN.INRegister>.GetExtension<INRegisterExt>(this.Base.adjustment.Cache.Current);

2 replies

andriikravetskyi35
Jr Varsity I
Forum|alt.badge.img+1

Hi, 

except row, paste current value of DAC of INRegister table, like this:

INRegisterExt iNRegisterExt = PXCache<PX.Objects.IN.INRegister>.GetExtension<INRegisterExt>(this.Base.adjustment.Cache.Current);


Forum|alt.badge.img+1
  • Author
  • Semi-Pro I
  • January 27, 2023

@andriikravetskyi35 Thanks for your reply.  I ended up using:

IINRegisterExt iNRegisterExt = PXCache<PX.Objects.IN.INRegister>.GetExtension<INRegisterExt>(this.Base.adjustment.Current);

as including Cache gave me an error.

Phil