Skip to main content
Solved

Adding a dialog box in a cusomization disables javascript from another dialog box.


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,

Best answer by darylbowman

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

 

View original
Did this topic help you find an answer to your question?

7 replies

  • Author
  • Freshman II
  • 9 replies
  • December 1, 2023

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.


sgaspar72
Jr Varsity II
Forum|alt.badge.img+1
  • Jr Varsity II
  • 57 replies
  • December 5, 2023

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. 
 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2546 replies
  • December 21, 2023

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


  • Author
  • Freshman II
  • 9 replies
  • December 21, 2023

Not yet.


sgaspar72
Jr Varsity II
Forum|alt.badge.img+1
  • Jr Varsity II
  • 57 replies
  • December 21, 2023

Anyone figured out a solution for this yet? 


darylbowman
Captain II
Forum|alt.badge.img+13

Related question here.


darylbowman
Captain II
Forum|alt.badge.img+13
  • 1525 replies
  • Answer
  • May 31, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings