Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8165391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:31:34+00:00 2026-06-06T19:31:34+00:00

I used document.getElementById(customerid).setAttribute(defaulttype, 2); document.getElementById(customerid).setAttribute(lookuptype, 2); Xrm.Page.getControl(customerid).setDefaultView({A9AF0AB8-xxxx-xxxx-xxxx-C6281FED7FAB}); in Form_onchange() , and it gives me

  • 0

I used

document.getElementById("customerid").setAttribute("defaulttype", "2");
document.getElementById("customerid").setAttribute("lookuptype", "2");
Xrm.Page.getControl("customerid").setDefaultView("{A9AF0AB8-xxxx-xxxx-xxxx-C6281FED7FAB}");

in Form_onchange(), and it gives me this error:

Object doesn’t support this property or method”.

If I close the popup window, the program actually works fine.

What might be the problem?

P.S. I’m running IE9 and the error message didn’t specify which method is not supported.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:31:35+00:00Added an answer on June 6, 2026 at 7:31 pm

    “{A9AF0AB8-xxxx-xxxx-xxxx-C6281FED7FAB}” isn’t a valid GUID. Make sure to use the exact GUID of the View.

    Ok, I’ve never seen anyone X out the GUID…

    Anyhow, take out line 2 and see if that works. I checked back on some of my code and I have lines 1 & 3.

    Also, your lookup needs to already be able to switch from accounts to contacts (type code 1 -> 2) within the interface (as a user not via javascript).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

document.getelementbyid('txtbox') is not working when I used in content page as it is working
I used the following function: function datediff() { var dat1 = document.getElementById('date1').value; alert(dat1);//i get
I used this, <a title=Logout onclick=javascript:document.getElementById('ctl00_ContentPlaceHolder1_LbLogout').click(); href=# class=logout>Logout</a></li> <asp:LinkButton ID=LbLogout runat=server style=display:none onclick=LbLogout_Click>Sign out</asp:LinkButton>
So in my code I used function $(id) { return document.getElementById(id); } I want
What is this?: document.getElementById(+id+) I have seen this used several times in code on
I don't understand how to manipulate the DOM very well. I have used document.getElementById('someid').innerHTML
I have a javascript like this, used i a bookmarklet: window.location=URL document.getElementById('username-id').value = 'User'
I tried to investigate the jQuery code, so I used this: document.write($.constructor); jsfiddle I
I have found Okapi Similarity measure can be used to calculated document similarity from
When the document(uri) function is used to load another document within the XSLT, where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.