Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Putting text in input field programmatically

Posted on by Microsoft Employee

Hi,

I am working in the account form. I need to put the value of my variable "str" in the search field as shown below in the picture. So I put the text "TESTACCOUNT" in the variable "str", no issues there.

The issue is getting the var str in that search box. So my goal is to filter the records according to str value.

I have tried the following 2 javascript lines but have no luck with either.

1. Xrm.Page.getAttribute('ShipmentReportsInformation_findCriteria').setValue(str)

2. document.getElementById("ShipmentReportsInformation_findCriteria").value = str;

Screenshot_5F00_51.png

Any idea on how to achieve this?

Kind regards

*This post is locked for comments

  • Suggested answer
    M.T. Eikelenboom Profile Picture
    M.T. Eikelenboom 5,241 on at
    RE: Putting text in input field programmatically

    I think you are trying to do unsupported customizations. Especially if you do something like document.getElementById.

    You might be better of writing a webresource, querying the webapi with the search string and showing the results.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans