Announcement

Collapse
No announcement yet.

Create property limit per user according to role

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create property limit per user according to role

    Hi everyone.
    I would like to know if it is possible to limit the creation of properties to users according to their profile.

    Example:
    If they have the "agency" profile, they can include 20 properties.
    If they have the "owner" profile they can include 3 properties.

    I have thought that it could be managed in 2 ways:
    1.- Hide the icon to create more properties when it reaches the limit.
    2.- Send error message when clicking on the add button.

    I appreciate your comments in advance to resolve this query by the simplest method.

    Thank you.
    Francisco.

  • #2
    Out of the box there is no way to restrict by numbers.

    There isn't an easy way to do it through GUI either, you can use Formula or Conditional Visibility to hide the creation menu but I think this will be flawed.

    Workflow might be possible but I'm not sure if you have the extensions.

    I'm going to assume you have no coding experience (nor do I have it to give you example code).

    Thinking about it; I think the best way to do it at the end is to have a secondary Role that is hidden (or visible); this role will be changed either by formula or workflow.

    So their Role might start out as having: Owner. But after they add the =>3 property, their role will get converted into: "Lock" which don't have the ability to "Create", they still can Read, Update and Delete but not Create. The formula must also be able to convert it back so that if they delete their 3rd Properties they can Create again.

    Of course this is all in theory of how I would approach it.

    Comment


    • #3
      Hola Francisco,

      esforim is right, there is no GUI or ""simple" way to limit the number of entity instances (records) that a user can create based on the user role or other conditions.

      If you are comfortable coding in javascript, php and are somewhat familiar with Espo program structure or the Backbone,js framework you can accomplish it using the dynamic-handler class.

      I just posted an example of how to limit the creation of new records based on custom logic conditions using the dynamic-handler class and Ajax calls that you could consult to develop your own solution.

      If you are interested, here's the link to the thread: https://forum.espocrm.com/forum/deve...ndler-and-ajax

      Saludos

      Comment


      • #4
        Hi, thanks for your responses.
        I am looking at different CRMs for a client and I'm not familiar with the code and structure of espocrm.
        If espoCRM fits the needs I will buy the Official Extensions Advanced Pack.

        The role change that espcrm suggests seems interesting and avoid touching a lot of code, but you would have to register the old role to reassign it in case of removing properties. It could be having an additional field indicating the initial role.

        I have knowledge of programming in php and javascript but not of the espocrm structure. (I'm on it). telecastg I will check the link sent and the structure to see if I finally get something interesting.

        Saludos

        Comment


        • #5
          Hi fmatias,

          Just notice you are new. Anyway welcome to EspoCRM. Secondly I just want to "plug" my thread, it might be useful to you: https://forum.espocrm.com/forum/gene...crm-and-design

          Please check out these two section that might give you a quick run down:
          Administration Details / Server Developer

          Require Coding

          Also you can refer to the official documentations here: docs.espocrm.com/

          Comment


          • #6
            Thanks for your attention.
            Francisco.

            Comment

            Working...
            X