Skip to main content

hello,

I added a dialog box in one of my customization's and noticed that Address Lookup stops working. I'm not sure what I’m doing wrong.

Normal.

Adding a Dialog

 

This is the result

 

Any help is appreciated. Thank you,

I narrowed down the problem. I noticed that the server side code snippet disappears when I add a dialog box.

<%
PX.Objects.CS.PXAddressLookup.RegisterClientScript(this, ds.DataGraph);
%>

I tried adding this back to the code from within the customization editor but it keeps disappearing.


We see the same thing with our clients. Seems to work on some screens but not on others. No clue why. Seems to be a non-functional feature for most. 
 

 


Hi @MarcoL45 were you able to find a solution? Thank you!


Not yet.


Anyone figured out a solution for this yet? 


Related question here.


This should solve your problem:

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);
}
}

 


Reply