Hi everyone,
We are currently working on a project where we are using the new Approvals component for a custom object. So far it works well for managing the approval flow, but we are facing some limitations when trying to build advanced filters that involve approvals.
For example, our custom object is “Quotations”. We would like to create a filter to display all Quotations that have approvals with the status "To set".
However, when configuring the filter in the section, the “Approvals” object does not appear as a related object, which means we cannot reference approval records in the filter conditions.
Has anyone faced this situation before or found a workaround to filter records based on the status of related approvals?
Any suggestions or best practices would be greatly appreciated.
Thanks!
Like
Hi!
Currently, there isn’t a built-in way to filter records in a section based on the status of related approvals when using the new Approvals component. The approvals are stored in SysApproval, which is not exposed as a related object in section filters.
As a workaround, you can create a database view based on the SysApproval table filtered by the required `ReferenceSchemaName`. Then create a virtual object in Creatio that is bound to this view and includes the necessary columns.
After that, configure the field that links to your main object (for example, `EntityId`, renamed to something like `QuotationId`) as a lookup to the Quotations object. Once this relationship exists, the virtual object can be used in filters, which will allow you to filter Quotations based on the status of related approvals.
This approach helps expose approval data for filtering purposes when using the new approvals mechanism.