Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

How to get text field value in crm 2015 which is coming from Html webresource through javascript?

(0) ShareShare
ReportReport
Posted on by 125

 <input type="text" id="visDate" style="font: 15px Calibri; width:130px" onchange="return getSlot();">

i want to get this VisDate  text field value through  java script  which is coming from html web-resource i.e added in  case entity form.  

how to get it  please help me.

  • Suggested answer
    saurabhtiwarii Profile Picture
    on at
    RE: How to get text field value in crm 2015 which is coming from Html webresource through javascript?

    Hi,

    Document.getElementById() may require legacy form rendering.

    developer.mozilla.org/.../getElementById

    Please mark my comments as answered if this helps.

    Thanks,
    Saurabh

  • NehaGupta Profile Picture
    125 on at
    RE: How to get text field value in crm 2015 which is coming from Html webresource through javascript?

    Hi i am using this one but getting null in alert  of visit date. I need to get value of this text field.

    function Rollback(){

    var source = Xrm.Page.data.entity.attributes.get("statuscode")

    var information = source.getValue();

    var customHtml = Xrm.Page.ui.controls.get("WebResource_SlotAvailability");

    var destination = customHtml.getObject().contentWindow.document;

    if(destination) {

     var visitDate = destination.getElementById("vistime");

      alert(visitDate);

     if(customControl) {

       customControl.value = information;

      alert(customControl.value);

     }

    }

    }

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: How to get text field value in crm 2015 which is coming from Html webresource through javascript?

    HI,

    You can easily get text value from html web resource javascript code using document.getElementById("VisDate  ").value and once you have the text value, you can use parent.Xrm.Page to update any field on case form.

    docs.microsoft.com/.../webpage-html-web-resources

    If found helpful, Please mark my answer verified.

  • Suggested answer
    Marco.P Profile Picture
    2,405 on at
    RE: How to get text field value in crm 2015 which is coming from Html webresource through javascript?

    Hi, maybe as a workaround  you can try to save the field value on storage, and try to get It through your js form handler.

    Hope it helps,

    www.google.com/.../

    Hope it helps,

    Marco

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans