locked
Hide New Button in Lookup dialog od lookup field crm2011 online RRS feed

  • Question

  • Dear all,

    I now have a lookup field on form.

    And I want that when i click on lookup field -> the lookup is opened without New button.

    In the past use:

               var beneficiaryLookup = crmForm.all.core_beneficiaryid;
                beneficiaryLookup.AddParam("ShowNewButton", "0");

    And its work.

    But currently Im test on organization online and it not work, it said that AddParam is undefined.

    Any idea for it, please?


    If my question/answer can help you, please give me a points :) ----You may be disappointed if you fail, but you are doomed if you don't try---

    Thursday, January 24, 2013 7:46 AM

All replies

  • Hi,

    One problem could be your code use crmForm. With new update rollup 12 for some operations you have set a flag to enable the use of crmForm

    The crmForm API that was used to access form elements in Microsoft Dynamics CRM 4.0 will continue to provide backward compatibility only for Internet Explorer. If you have code that uses the crmForm API, or any unsupported internal methods that interact with form objects that used HTC components, you must select to Include HTC support in CRM Forms on the Customization tab of System Settings . Using this setting will not allow newer versions of Internet Explorer to provide the best performance possible. Internet Explorer 10 does not support HTC components. The option to continue support for HTC will be removed in the next major release of Microsoft Dynamics CRM. At that time the crmForm API will no longer be supported. Before that time you should upgrade your form scripts to use Xrm.Page . For more information, see Upgrade Scripts to Microsoft Dynamics CRM 2011.

    See more information here: http://msdn.microsoft.com/en-us/library/hh771584.aspx

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Thursday, January 24, 2013 11:02 AM
  • Dear all

    Do you know any way to change the View selector text on the lookup.

    When I set default view just the grid is update and the View selector is not updated?

    Thanks,


    If my question/answer can help you, please give me a points :) ----You may be disappointed if you fail, but you are doomed if you don't try---

    Thursday, January 24, 2013 11:06 AM
  • Hi,

    And your previous problem? I found more information here http://blogs.msdn.com/b/crm/archive/2012/05/29/resolve-breaking-script-issues-when-upgrading-to-the-next-release-of-microsoft-dynamics-crm.aspx and you have use addCustomView see a example here: http://nishantrana.wordpress.com/2010/12/31/filtered-lookup-in-crm-2011/

    For your new question check the addCustomView i think that resolve your problem.

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Thursday, January 24, 2013 12:04 PM
  • Hi,

       You can use the fallowing code for hiding "New" button on lookup dialog.

         crmForm.all.lookupid.AddParam("ShowNewButton", "0"); //Works tillRollup 11

         document.getElementById("Lookup Id")._behaviors[0].AddParam("ShowNewButton", "0"); //Works for Rollup 12/13

        For More CRM Java scrpts for Rollup 12/13  visit this link 

       http://crmjavascripts.blogspot.in/2013/05/crm-java-scripts-for-rollup-12-changes.html

    Thanks




    • Edited by Neo Yadav Tuesday, June 18, 2013 11:52 AM
    Tuesday, June 4, 2013 6:12 AM
  • HI IF you check the Opened Lookup Dialog Url , you will find "ShowNewButton" if you set this value to "0" , new button will not appear . But you need to overwrite the Onclick functionality of that lookup field ...

    Zafar Khan

    Tuesday, September 3, 2013 12:14 PM