Solved

BusinessAccountMaint Extenstion DefLocationAddress view

  • 2 August 2023
  • 2 replies
  • 40 views

Userlevel 3
Badge +1

I’m working on a customization to disable editing of Business Accounts under certain conditions.

I have it working for most portions of the screen with the following code, but I cannot figure out how to access the DefLocationAddress view from my extenstion.

Looking at the Acumatica source, it looks like that portion is implemented in an extension.

Any idea how I can access that view from my extenstion to disable it?

 

PXUIFieldAttribute.SetEnabled(e.Cache,row,false);
PXUIFieldAttribute.SetEnabled(Base.Caches<Address>() , Base.AddressDummy.Current, false);
PXUIFieldAttribute.SetEnabled(Base.Caches<Contact>(), Base.ContactDummy.Current, false);
PXUIFieldAttribute.SetEnabled(Base.Caches<CSAnswers>(), Base.Answers.Current, false);
PXUIFieldAttribute.SetEnabled(Base.Caches<CR.Standalone.Location>(), Base.BaseLocations.Current, false);

Thanks

Scott

 

icon

Best answer by Zoltan Febert 3 August 2023, 01:48

View original

2 replies

Userlevel 3
Badge +1

zfebert56, 

Thanks for your help, that did the trick.

Userlevel 6
Badge +3

This is what I use in my VendorMaint extension, something similar should work for you as well.

var defLocationExt = Base.GetExtension<VendorMaint.DefLocationExt>();
defLocationExt.DefLocationAddress.AllowUpdate = false;

Reply


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