Question

Read data

Hello

I'm working on a Creatio application with two sections:

  1. Application (Service Request)
  2. License

Each License belongs to a specific Application.

I have already created a Request Number lookup field in the License section, so each License is linked to its corresponding Application, and this relationship works correctly.

Now I want to achieve the reverse: on the Application page, I want to display the related License automatically.

To do this, I added a License Number lookup field to the Application section (lookup to the License object). However, I cannot get it to populate automatically with the related License.

I tried several approaches, including using a Business Process with Read Data and Modify Data, but I haven't been able to make it work.

What is the recommended or best-practice approach in Creatio for implementing a one-to-one relationship like this? Should I use:

  • A Business Process?
  • A Business Rule?
  • A Detail instead of a lookup?
  • Or is there another recommended configuration?

Any guidance or examples would be greatly appreciated. Thank you!

Like 0

Like

1 comments

Hi,

For a true one-to-one relationship, I would not recommend maintaining two independent lookup fields unless you really need to store the reverse reference for reporting/integration purposes.

The cleaner approach is to keep a single source of truth:

License.Request Number -> Application

Then, on the Application page, display the related License through the page configuration rather than trying to populate Application.License Number automatically.

If you are using Freedom UI, the best fit is usually Multiple data sources. Add License as an additional/secondary data source on the Application page and configure the relation criteria using the existing lookup:

License.Request Number = current Application

After that, you can place the needed License fields directly on the Application page. This is the closest match for a real 1:1 UI, because the user sees License data as part of the Application page without duplicating the relationship.

Documentation:
https://academy.creatio.com/docs/8.x/no-code-customization/customization-tools/ui-and-business-logic-customization/multiple-data-sources

A Business Rule is not the right tool for this. Business rules are mainly for UI behavior, visibility, required fields, validation, etc. They do not automatically query a related child record and populate a reverse lookup.

A Business Process can do it, but only if you intentionally want to denormalize the data. In that case, you would need to handle all scenarios: License creation, changing the Application on the License, deleting/unlinking the License, and preventing more than one License per Application. Otherwise the two lookup fields can become inconsistent.

Show all comments