How can I remove the "unlink relationship" either permanently, user based or amount of relationships?

StackOverflow https://stackoverflow.com/questions/22305907

Вопрос

On SugarCRM 7+ how can I remove the "unlink relationship" either permanently, user based or amount of relationships?

My problem is that I have two custom modules with a many-to-many relationship between them and I can't limit a user from editing, deleting or creating records on both modules since I actually want the users to be able to do those actions etc but at the same time I need to block unlinking of relationships either:

  1. permanently
  2. user based
  3. based on the current amount of relationships

I've gone through a lot of google searching (about 7 hours total) but I couldn't find a tutorial or blog post about this type of customization for SugarCRM 7.1+ (I feel things changed a bit on subpanel customization on this version)

also, is there a way to easily add a "created_datetime" and "deleted_datetime to the relationship itself? I found a few "overkills" for such customization and my sugar skills are not that high to implement them.

Это было полезно?

Решение

I've decided to have extra modules making the relationships so then I have a related field on each of my current modules pointing to a module in the middle where I can customise fields anyway I want "and" I will block the related fields from modification based on user and if the field has been set already etc.

This is an obvious solution but I wanted to have less modules for plain and simple OCD. Once I convinced my brain that not being able to customise the relationship with "control" fields was even worse for OCD than having more modules everything settled down!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top