How to set initial_filter in SuiteCRM 8.6?

Hello,
is it possible to set initial filter for search modal dialog that appearch when user clicks on arrow next to relate field?

i tried to use initial_filter:

'displayParams' => array (
        'initial_filter' => '&<field_name>=<value>',
    ),

but looks like this does not work in SuiteCRM 8+

this is what i am trying to achieve:


Hey @adam_2, welcome to the community!

This seems to be missing feature on SuiteCRM v8. It has already been raised on github.

Can we use the below artical for the initial filter

I just tried this out today on 8.9.2 Initial Filter definately does not work in SuiteCRM 8.

This:

'displayParams' => array (
		'initial_filter' => '&account_type_advanced=Vendor',
		),

or

'filter' => [
			'static' => [
				[
					'field' => 'account_type',
					'operator' => '=',
					'value' => 'Vendor'
				]
			]
		]

Also tried this:

'filter' => [
				'static' => [
					'account_type' => 'Vendor',
				],
			],

Basically what I want to do (and could do in SuiteCRM 7)

Without having it tested, that seems to be the logic around the default / selected target lists in the 8.9.x campaigns multi-related field.

for filtering related records in the MultiRelateEditFieldComponent

Thanks @BastianHammer thats the tutorial I was following. It doesn’t work.

Also there is no “MultiRelate” field type, unless it’s strictly created by code. I assume they mean from a subpanel, not a relate type field. The documentation is really hard to understand.

Yes, the new field types are missing in the studio.
I’ve built them just via code and/or own modules to load them later on.

Hope this will be “fixed” sooner or later, otherwise all the new features and usefulness is restricted to developers only and the target audience of SuiteCRM is shrinking quickly.

As for the documentation: it doesn’t lead to a solution of this topic, but in general - if you turn it around, don’t have a specific goal in mind and just start copying / tinkering the tutorials and then see the outcome, that often works.
It’s a different approach - not so much a guide to a specific solution but more sth. like getting to know what could be done with the system in general. Not always helpful and difficult to interprete / find use for.

This was a very useful developer feature in SuiteCRM 7. Hopefully, it will be added soon. Being able to filter the relate field popup is such a great feature for UI.

I had the exact same working in V7, and for now like you, impossible to make it work in V8. I’ve tried to edit the detailviewdef or editviewdef, for now I didnt find how to do this

1 Like