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 6925099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:44:47+00:00 2026-05-27T10:44:47+00:00

I have added a custom form on the opportunity entity and have some javascript

  • 0

I have added a custom form on the opportunity entity and have some javascript attached to it.

I’m calling the form using window.open and the formId in the url to open the form and is only used to create opportunity entities.

Inside the javascript I’m simply trying to populate some fields but the Xrm.Page.data object is always null.

$(document).ready(function () {
    Xrm.Page.getAttribute("ct_testfield").setValue('test');});

Thanks!

Jon

UPDATE:
Apparently $(document).ready() fires before the Xrm.Page.data object is loaded.

I instead used the “form properties” dialog on to set my function to fire “OnLoad”.

I’m guessing $.ready is firing when the DOM is ready within the IFrame or whatever it lives in and not all the other resources being loaded.

Hopefully this helps someone else.

I will close this in 7hrs when I’m able 🙂

  • 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-05-27T10:44:47+00:00Added an answer on May 27, 2026 at 10:44 am

    UPDATE: Apparently $(document).ready() fires before the Xrm.Page.data object is loaded.

    I instead used the “form properties” dialog on to set my function to fire “OnLoad”.

    I’m guessing $.ready is firing when the DOM is ready within the IFrame or whatever it lives in and not all the other resources being loaded.

    Hopefully this helps someone else.

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

Sidebar

Related Questions

I added a custom form to my opportunity entity so now I have the
I have a list within Sharepoint, using a custom new form I have added
I am using jquery validation plugin for form validation. I have added a custom
In Silverlight 3.0 I have added a custom behavior to some UIElement in Code
I have added a form to a project to create a custom message box.
I have a form with multiple fields that I'm validating (some with methods added
I have added a custom action to the CustomList type. For testing purposes I
I'm trying to make a custom infowindow. Version = 2. I have added my
If have created a custom role within SqlServer which I added to the db__denydatareader
I have a custom list, and I've added a 'Page Image' field by clicking

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.