web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

I am getting the following error , which happens to only when i upload javascript for addrerss popup .?

(0) ShareShare
ReportReport
Posted on by 670

I am getting the following error , which happens to only when i upload javascript for addrerss popup .if any one know about this error please help me

There was an error with this field's customized event.

Field: window

Event:load

 

error_2D00_javascript.JPG

 

my java script for address popup

***********************************

 function showAddressDialog() {
    var new_addressvalue;
    if (Xrm.Page.context.client.getClient() != "Mobile") {
        new_addressvalue = Xrm.Page.getAttribute("new_address").getValue();
    }
    else {
        var new_city = Xrm.Page.getAttribute("new_city").getValue();
        var new_country = Xrm.Page.getAttribute("new_country").getValue();
        var new_countrycode = Xrm.Page.getAttribute("new_countrycode").getValue();
        var new_state = Xrm.Page.getAttribute("new_state").getValue();
        var new_zipcode = Xrm.Page.getAttribute("new_zipcode").getValue();
        // Achieve equivalent formatting
        //address1_line1
        //address1_line2
        //address1_line3
        //address1_city, address1_stateorprovince address1_postalcode
        //address1_country
        var addressText = "";
        if (new_city != null) {
            addressText += new_city + "\n";
        }
        if (new_country != null) {
            addressText += new_country + "\n";
        }
        if (new_countrycode != null) {
            addressText += new_countrycode + "\n";
        }
        if (new_state != null) {
            addressText += new_state + ", ";
        }
        if (new_zipcode != null) {
            addressText += new_zipcode + " ";
        }
        
        new_addressvalue = addressText;
    }
    Xrm.Utility.alertDialog(new_addressvalue);
}

 

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Syed Ibrahim Profile Picture
    6,257 on at
    RE: I am getting the following error , which happens to only when i upload javascript for addrerss popup .?

    Try to add debugger and debug using developer tool to check where the issue is.

    Follow the below link how to debug.

    crmbook.powerobjects.com/.../debugging-javascript-libraries

    Hope this helps. If suggestion resolved your query Mark it as Answered/verified to close the thread

  • account payable Profile Picture
    670 on at
    RE: I am getting the following error , which happens to only when i upload javascript for addrerss popup .?

    debugged using visual studio there is no error but when upload in crm showing like below

    "There was an error with this field's customized event.

    Field: window

    Event:load"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans