Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Horizontal scrolling bar for textarea

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

Sometimes there will be wide table inside the content of an email(below picture),

I am wondering if a horizontal scrolling bar can be added to the textarea in email form?

Thank you very much.

*This post is locked for comments

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Horizontal scrolling bar for textarea

    Hi Doll,

    As Deepesh already mentioned, you cannot do by supported way unless you are putting HTML web resource..

    If you want to add scroll bar by unsupported way.. then try this code

    function AddScrollBar()
    {
    
       Xrm.Page.getControl('new_description').setFocus();
       
       var desc=document.getElementById('new_description_i');
       desc.style.overflowX="Scroll";
       
    }

    Call this function on load of your form. and change new_description with your attribute. 

    In CRM 2013 mainly if you try to Do form DOM manipulation on form load, its not very easy. CRM form controls are mostly loaded when we are doing focus on control then only you can add custom style..

    Hope this will help.

    Thanks,

     

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Horizontal scrolling bar for textarea

    I felt really sorry

    Even I read the articles, I have totally no idea on how to add a scrollbar to description field.

    Xrm.Page.getAttribute('description').[what should be following here?]

    Xrm.Page.getAttribute('description').style.overflowX="Scroll"

    This is absolutely wrong>.<

  • Suggested answer
    Deepesh161 Profile Picture
    Deepesh161 6,317 on at
    RE: Horizontal scrolling bar for textarea

    msdn.microsoft.com/.../jj602964.aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Horizontal scrolling bar for textarea

    Thank you for your quick answer,

    Can you show some example of using xrm namespace for the description field?

    As my reply on 22 January, I tried to do it, but if was not success

    Regards,

  • Suggested answer
    Deepesh161 Profile Picture
    Deepesh161 6,317 on at
    RE: Horizontal scrolling bar for textarea

    The resolution is as I already suggested in previous comments.

    IF you want to have text area with scroll bar make a html webresouce like that, embed it on form.

    Second, use Xrm scripting to save it to description field.

    Even if you use unsupported DOM manipulation, it does not add scroll bars on the field.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Horizontal scrolling bar for textarea

    The problem not yet solve, can somebody give me some hints please??

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Horizontal scrolling bar for textarea

    Hi Mithilesh,

    Appreciate for your suggestion, but I don't need such function for the description, a simply horizontal scrollbar will fulfill my need :)

  • Suggested answer
    Mithilesh Kumar Profile Picture
    Mithilesh Kumar 10,045 on at
    RE: Horizontal scrolling bar for textarea

    Hi Doll,

    You can refer this for your Text Editor.

    community.dynamics.com/.../create-a-rich-text-textarea-in-microsoft-crm-2013-forms.aspx

    Hope that helps

    Thanks

    Please mark my post as verified if you found it helpful

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Horizontal scrolling bar for textarea

    Hi Deepesh,

    Would you mind elaborate a little bit more?
    I am very new to CRM coding,

    Xrm.Page.getAttribute('description')
    
    or 
    
    Xrm.Page.getControl('description')


    and how to set the style overflow?

    It seems that [   Xrm.Page.getAttribute('description').style.overflowX="scroll";  ], is not a correct behavior.

    It will be graceful if sample can be provided~

    Thanks!!

  • Suggested answer
    Deepesh161 Profile Picture
    Deepesh161 6,317 on at
    RE: Horizontal scrolling bar for textarea

    I will rather suggest you to use a html webresource with jquery rich text editor and then internally save to CRM via Xrm namespace.

    Whatever script we apply here can easily break in future. HTML webresource will be useful until any methods are not deprecated.

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans