Sugar 7 : how to disable "create lead" button in Main Menu?

Hello everyone,
Here i come again with a new problem/question !

Sugar 7.2.0, Pro edition :
My Leads are automatically created (by .csv imports or by another way), and I would like to disable the standard creation for all users.

My question could be cut in two parts :
 - How do I disable the "Create a Lead" button in the module tab's dropdown on the Main Menu?
( tried to disable it via custom/modules/Leads/clients/base/views/headerpane/headerpane.php, ran QRR, but did nothing)
 - How do I disable the "Create" button in the Leads' ListView?
(i checked out custom/modules/Leads/clients/base/views/list/list.php and there is nothing about buttons)
 - How do i disable every create leads button, in all the application, in fact?

Thanks a lot for giving me clues on where i should search :)
Parents
  • I disabled the list view create by removing the button from list-headerpain.php
  • Sorry I was unclear as usual

    In my case it was for a custom module and I created modules/zz_expenses_detail/clients/base/views/list-headerpane/list-headerpane.php

    I havent tested it but I'm pretty certain for leads you could create it in custom/modules/leads/....

    my code is

    $viewdefs['zz_expenses_detail']['base']['view']['list-headerpane'] = array(
        'template' => 'headerpane',
        'title' => 'LBL_MODULE_NAME',
        'buttons' => array(
            array(
                'name' => 'sidebar_toggle',
                'type' => 'sidebartoggle',
            ),
        ),
    );


  • coming with more precisions : looking at the html hierachy generated, it looks like all the div containing the headerpane is empty.
    normally it looks like this :

    <div id="content">
      <!-- some other parent divs -->
        <div class="main-pane span8">
          <div>
            <div class="headerpane">
              <h1>
                <div class="record-cell"><span class="module-title"> Opportunities</span>
                </div>
                <div class="btn-toolbar pull-right dropdown">
                  <span sfuuid="11" class="list-headerpane"> <!-- here is the a for the create button--> </span>
                  <span sfuuid="12" class="list-headerpane" tabindex="-1"> <!-- here is the button for toggling the drawer--> </span>
                 </div
               </h1>
    <!-- all other code-->

    But for my leads, i now only have the following :

    <div id="content">
      <!-- some other parent divs -->
        <div class="main-pane span8">
          <div>
            <div ></div>
    <!-- all other code-->

    So i have only a empty <div></div> instead of all my full html for my headerpane.... absolutely no idea on what happened....

Reply
  • coming with more precisions : looking at the html hierachy generated, it looks like all the div containing the headerpane is empty.
    normally it looks like this :

    <div id="content">
      <!-- some other parent divs -->
        <div class="main-pane span8">
          <div>
            <div class="headerpane">
              <h1>
                <div class="record-cell"><span class="module-title"> Opportunities</span>
                </div>
                <div class="btn-toolbar pull-right dropdown">
                  <span sfuuid="11" class="list-headerpane"> <!-- here is the a for the create button--> </span>
                  <span sfuuid="12" class="list-headerpane" tabindex="-1"> <!-- here is the button for toggling the drawer--> </span>
                 </div
               </h1>
    <!-- all other code-->

    But for my leads, i now only have the following :

    <div id="content">
      <!-- some other parent divs -->
        <div class="main-pane span8">
          <div>
            <div ></div>
    <!-- all other code-->

    So i have only a empty <div></div> instead of all my full html for my headerpane.... absolutely no idea on what happened....

Children
No Data