none
CRM form中如何实现对字段加上鼠标注解 RRS feed

  • 问题

  • 默认表单中的字段鼠标注解就是label的名称,现在我想实现中英文对照的功能,也就是字段显示名是英文,鼠标注解是中文。

    请大虾指点迷津!

    2010年9月8日 8:48

答案

  • 你可以在onload事件动态注入HTML标识ALT

    http://www.cnblogs.com/MSCRM/articles/1704479.html

    http://jianwang.blogspot.com/2008/09/customize-crmform.html

    /* append text under new_button */
    if(crmForm.all.new_button != null)
    {
     var html= document.createElement( "<LABEL>");
     html.innerText = "this is a text field";
     crmForm.all.new_button.parentNode.appendChild(html);
    }
    


    Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com, http://www.mscrm.cn

    2010年9月8日 14:11
    版主
  •  

    If you are using the CRM2011 beta, here is an example about how to update the tooltips of both the Account Name "Label" and the Account Name "Field"

     

    1. Create a JScript type Web Resource

    1.  
      1. Navigate to Settings>Customizations>Customized the System>New>Web Resource
      2. In the Web Resource editor, enter Name as "new_myjs", select JScript type, and click Text Editor and paste the following code

    function myOnload()

    {

    document.getElementById("name_c").title="New tooltip"; //Update the tooltip of the Account Name Label

    document.getElementById("name").title="New tooltip"; //Update the tooltip of the Account Name Field

    }

     

    c. Save and Close the Web Resource edtior(This would also publish the Web Resource)

    2.Launch the Account Form Editor

    1. Navigate to Settings>Customizations>Customized the System>Entities>Account>Forms>Main Form
    2. Click Form Properties
    3. Click Add button in the Event tab Form Libraries section
    4. Select the new_myjs and click OK
    5. Click Add button in the Event Handlers section(Make sure Control=Form and Event =OnLoad)
    6. Enter "myOnload" in the Function
    7. Make sure the enabled box is checked
    8. Click OK twice
    9. Click Save
    10. Click Publish
    11. Click Save and Close

    3. Launch Account Form

     

    2010年9月16日 21:59

全部回复

  • 你可以在onload事件动态注入HTML标识ALT

    http://www.cnblogs.com/MSCRM/articles/1704479.html

    http://jianwang.blogspot.com/2008/09/customize-crmform.html

    /* append text under new_button */
    if(crmForm.all.new_button != null)
    {
     var html= document.createElement( "<LABEL>");
     html.innerText = "this is a text field";
     crmForm.all.new_button.parentNode.appendChild(html);
    }
    


    Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com, http://www.mscrm.cn

    2010年9月8日 14:11
    版主
  •  

    If you are using the CRM2011 beta, here is an example about how to update the tooltips of both the Account Name "Label" and the Account Name "Field"

     

    1. Create a JScript type Web Resource

    1.  
      1. Navigate to Settings>Customizations>Customized the System>New>Web Resource
      2. In the Web Resource editor, enter Name as "new_myjs", select JScript type, and click Text Editor and paste the following code

    function myOnload()

    {

    document.getElementById("name_c").title="New tooltip"; //Update the tooltip of the Account Name Label

    document.getElementById("name").title="New tooltip"; //Update the tooltip of the Account Name Field

    }

     

    c. Save and Close the Web Resource edtior(This would also publish the Web Resource)

    2.Launch the Account Form Editor

    1. Navigate to Settings>Customizations>Customized the System>Entities>Account>Forms>Main Form
    2. Click Form Properties
    3. Click Add button in the Event tab Form Libraries section
    4. Select the new_myjs and click OK
    5. Click Add button in the Event Handlers section(Make sure Control=Form and Event =OnLoad)
    6. Enter "myOnload" in the Function
    7. Make sure the enabled box is checked
    8. Click OK twice
    9. Click Save
    10. Click Publish
    11. Click Save and Close

    3. Launch Account Form

     

    2010年9月16日 21:59