0 votes

Hi Guys,

I was wondering if there's a nice and clean way to override the result of the search page with a custom function?

What i need is the following:

  • Open the standard search window from a relational detailmenu with the normal search features of Efficy and the createrelation action (so you can also create a new relational record)

  • If you click on one of the search result records, a custom function needs to start.

Hopefully someone has a simple way to do it, instead of overriding all pages and macro's.


Michael de Groot

asked in Efficy/ Client side by (188 points)

1 Answer

+1 vote

Hi Michael

You can define multiple search queries on an entity by adding them in SYS_QUERIES. It has been described in an earlier overflow post. Because you keep on using the /search request, special grid tags will remain working such as <#A=$FIELD$>. This tags allows you to define custom actions.

answered by (6.9k points)
Hi Kristof,

I have tested this and it works!

However for this customer there is a slight change in specifications:
- A search needs to be opened from the detail menu (proj_loca), based on the custom entity Loca (locations).
- If a location is found or newly created it needs to replace that location (and do some other stuff).
The search must be default Efficy for the rest of the functionality. I tried different approaches, but i still have no luck getting this to work properly.

Kr, Michael
Design in a nutshell:

What you need is the right action in the search URL. So, you need to make a specific command in that context menu that executes via pub/sub a client side Javascript that opens the search in a new window.

With a createRelation verb, you can link the selected (or new) loca entity to the project after it has been selected from the search screen.


In the database workflow, intercept the linking operation and remove the previous link with the other loca. The refreshOpener will refresh the page you started from and then you should see your new or selected LOCA linked to the project.
1,173 questions
1,433 answers
325 users