Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Text field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
I need complete javascript code for multiline text field , when the maximum length reached , need a line break , can anyone help me with the code , im new to coding

*This post is locked for comments

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Text field

    You want to add child record using JavaScript? If yes then it is possible to add record using JavaScript.

    Also I would suggest you to open. New thread for this question

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Text field

    Hi , I have a scenario i need to create subgrid in parent entity which should display records related to the child entity . I just tried this using form insert option , which worked well . I want to know is there any workaround for this scenario using javascript? Can anyone suggest ideas?

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Text field

    Hi Hema,

    In past i had somthing similar requirement like you have below is the link

    community.dynamics.com/.../741574

    , but unfortunately dynamics doesn't support any event like onKeyPress.

    Thanks,

    Shahbaaz

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Text field

    Hi Shahbaaz , i would like the line break to happen as an when i type the text i mean , the line should break automatically when it reach the specific length. When i googled i got this idea of addOnKeyPress function . Can u suggest me on this?

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Text field

    There is surly something getting called on page load event, please make sure.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Text field

    You mean javascript for the same entity or for different entity ? In same entity i don't have any javascript.

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Text field

    do you have any other javascript on page load? if yes please check it, may be it might be creating issue to you can share that code

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Text field

    Hi sorry i tried your code once again with event handler and it is working fine . Just that i'm getting a pop message for which i'm not sure what should be corrected . Please find attached screenshotUndefined-error.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Text field

    Thank  you soo much for the code it was really helpful and sorry for asking you too many questions . I had to ask too many questions as i'm new to Dynamics CRM.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Text field

    Hi i have tried your code , it is working however i'm getting a pop up message screenshot of which is attached in the below comment

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans