Skip to content

Automatically attach relations when creating a new object

Info

This guide is only valid for the new design of the Lime CRM Web Client. Also, it only affects objects created from the plus sign on an object relation tab, not from the plus sign in the Web Client main menu.

When creating a new object with the Create new dialog, it's possible to get pre-filled relations depending on other relations by configuring it in Lime Admin. For each limetype, you can choose which relation properties that should be auto attached when creating new objects of that limetype. When a property is set to be auto attached, relations of the same limetype on the object card will be auto attached if found. The relation of the object card itself will always be auto attached and is not configurable.

Configuring auto attach in Lime Admin

The Views section in Lime Admin contains the views for all limetypes. In the Card view for each limetype, there are sections with controls containing the different properties for that limetype. For every relation property there's a checkbox deciding whether the property should be auto attached when creating a new object of that limetype.

The coworker relation

The coworker relation is handled slightly differently compared to the other relations. When Auto attach is checked in Lime Admin for a coworker property, the coworker relation in the create dialog will always be pre-filled with the coworker relation on the object card. Just like how it works for any other relation property.

But when Auto attach isn't checked for a coworker relation, it will always be pre-filled with the currently logged in coworker.

Example - Auto attach company when creating a todo on a person

You want to create a new todo for the person Indiana Jones and the todo should be automatically related to the company which Indiana Jones is connected to. Then the Auto attach for the company relation on the todo limetype should be set.

  1. Go to the Card view of the Todo limetype and find the Company relation property among the section controls.

  2. Set the checkbox Auto attach to true by checking it.

  3. Go to Indiana Jones and start creating the new todo by pressing the Todo relation tab and then the plus sign to the right in the action bar.

    The Create new dialog opens up and the company relation is now pre-filled with LEGO (DEMO), which is the company Indiana Jones is connected to. The relation fields Coworker and Business are not configured to be auto attached but the coworker is set to the currently logged in coworker Lime Administrator as explained in The coworker relation .

Attachable objects config is deprecated in the new design

In the old design we could auto attach relations when creating a new history note by using the Attachable objects configuration in Lime Admin.

In the new design, creating a history object will work exactly the same as when creating objects of other limetypes. The old Attachable objects config is migrated to the card view for the history limetype and will not be used anymore. This means that every property you have previously configured in the old Attachable objects config will be automatically configured on the card view for history.