Announcement

Collapse
No announcement yet.

Custom contact entity to portal

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

  • Custom contact entity to portal

    How can I create a custom contact entity as a portal user? Portals somehow always refer to contact. I can't find an option where I can select from contact entities.

    If I have all contact groups (service providers, trading partners, owners, managers, etc) in one contact list, it makes the work very cumbersome.
    The assignment of an entry to a contact is based on its group. When all contacts are displayed, I always have to filter the list first to be able to select the appropriate contact.

    It would also prevent erroneous assignments if the user cannot assign the supplier type contact as the contact in a car cleaning job where only service partner type should be possible.

    If I split contacts into different entities, I can define an entity as a possible contact source and only those contacts are displayed that can be considered for the entry.
    The only problem is that I cannot give the contact access to the portal.
    would also like to create the portals according to the contact entity. Since contact entity X cannot do anything with portal Y.

  • #2
    Hi,

    Perhaps this diagram will help you understand the relationship between users, contacts, portals and portal_roles.

    Click image for larger version  Name:	Portal-User-Contact-Portal_Role relationship.png Views:	0 Size:	44.1 KB ID:	86490

    Since you are interested in coding, I would just use the Admin GUI to create the entities and then implement a hook to execute SQL queries as needed.

    Full disclaimer, the developers strongly discourage the use of raw SQL and would like you to learn and use their custom ORM query language only, but quite frankly, if you are fairly proficient with SQL and knowledgeable about basic avoidance of malicious SQL injection, it is in my opinion, an uphill and unecessary battle.

    in our application we use the free app Flyspeed SQL Query (from which the screenshot was taken) to test queries which saves us many hours of debugging.​
    Last edited by telecastg; 12-20-2022, 12:21 AM.

    Comment

    Working...
    X