And attempting to include it in the ASPX page doesn’t work because it’s removed by the validation process. Since the AddressLookupPanel.inc is added as an include, it stands to reason that when modifications are made to the ASPX page, the validations removes it there as well. That’s the best I can come up with.
This code determines if Bing or Google maps API should be used, which leaves it out of the page, as @Zoltan Febert figured out. All we need to do is get this to run. In order to do that, I added it into a Page_Load event in the code-behind file CR304000.aspx.cs and replaced the original file. This works!
However, I’m not sure this is actually a great solution, since it’s really not a customization layer anymore, but rather a replacement.
I also attempted to include this with a PXLiteral, but either I did it wrong or it doesn’t work.
@darylbowman I think everything is a great solution when we need to fix real Acumatica bugs.
public OpportunityMaint_Extension : PXGraphExtension<OpportunityMaint> { public override void Initialize() { base.Initialize();
// Add the Page_Load event handler var page = System.Web.HttpContext.Current?.Handler as PX.Web.UI.PXPage; if (page is object) page.Load += Page_Load; }
// Executes the PXAddressLookup script which is broken by the page customization private void Page_Load(object sender, EventArgs e) { var page = (PX.Web.UI.PXPage)sender; PX.Objects.CS.PXAddressLookup.RegisterClientScript(page, Base); } }