Disable record's creation

Hello everybody !

I have a really urgent problem to solve :

How can i disable the "creation" of new records (in standdard modules like Accounts, but in custom too) for few users?

I was thinking about roles, but there is nothing on the role management.
I would like to disable the creation of new Accounts for the role "lambda user".

of course, we have to take care of disable "duplication" too.

By disable, i mean, disallowed access to the button "create" and "duplicate" and to disallowed the action.

Do you know how to disable the action of creation/duplication and how to hide the "create"/"duplicate" buttons ?

Thanks a lot !

ps : Im on Sugar 7.5.1 Pro
  • Hey I got the solution for mobile app Disable record's creation below is the link where  I have share my code.
    How to restrict Account Create In to Mobile-App sugarCRM 7.* ?

  • Hello Everyone,

    I got it working really well, as described by Gaelle.

    I wonder if it is possible to set custom acls e.g. acls.Opportunities.customButton= 'no';

    and to use it together with custom buttons/links e.g. /custum/modules/Opportunities/clients/base/record/record.php:

    <?php
    $viewdefs['Opportunities'] = 
    array (
      'base' => 
      array (
        'view' => 
        array (
          'record' => 
          array (
            'buttons' => 
            array (
              0 => 
              array (
                'type' => 'button',
                'name' => 'cancel_button',
                'label' => 'LBL_CANCEL_BUTTON_LABEL',
                'css_class' => 'btn-invisible btn-link',
                'showOn' => 'edit',
              ),
              1 => 
              array (
                'type' => 'rowaction',
                'event' => 'button:save_button:click',
                'name' => 'save_button',
                'label' => 'LBL_SAVE_BUTTON_LABEL',
                'css_class' => 'btn btn-primary',
                'showOn' => 'edit',
                'acl_action' => 'edit',
              ),
              2 => 
              array (
                'type' => 'actiondropdown',
                'name' => 'main_dropdown',
                'primary' => true,
                'showOn' => 'view',
                'buttons' => 
                array (
                  0 => 
                  array (
                    'type' => 'rowaction',
                    'event' => 'button:edit_button:click',
                    'name' => 'edit_button',
                    'label' => 'LBL_EDIT_BUTTON_LABEL',
                    'acl_action' => 'edit',
                  ),
                  1 => 
                  array (
                    'type' => 'rowaction',
                    'event' => 'button:create_platformaccount:click',
                    'name' => 'create_platformaccount',
                    'css_class' => 'create_platformaccount',
                    'label' => 'LBL_CONVERT_BUTTON_LABEL',
                    'acl_action' => 'customButton',
                  ),
                   ...
    

    What do you think?

  • Just answering my own question above. After some tests, it seems to work.