0 votes


In project consult page, I customised the tab where linked oppos are displayed.

For each oppo linked, I had to display relation values between a custom entity and oppo.

It look like this:

relation between proj and oppo

The custom:

DetailGrid.Proj.Oppo {[
    <%GetDetailGrid(columndefs="GridColumns", entity="$DETAIL$", columns="%%Macro('DetailGridColumns')", sum="%%Macro('DetailGridSum')", group="NAME")%>
DetailGridColumns.Proj.Oppo {[NAMEINDICATOR,F_TOTAL]}

NAMEINDICATOR is a field given by the customized SYS_QUERY

Then to display the icon to get the edit relation menu:

group {[
<tr class="group">
<td colspan="$COLUMNCOUNT$">
<span class="dropdown no-pip i-menu small" data-dropdown="detail-menu" data-args="<#G=$KEY$>"></span>
<i class="i-<#ACTION>" data-msg="group;<#ACTION>;<#HASH>"></i>

And, once again in MacroConsult:

DetailMenu.Proj.Oppo {[<%GetPopupMenu(id="detail-menu", class="has-icons small", ulargs='data-channel="detailmenu"', count="4",
text1="Edit #DETAIL", image1="i-edit",
text2="Duplicate", image2="i-Dupl",
text3="Edit relation", image3="i-edit",
text4="Delete relation", image4="i-delete",

I have the menu:
relation menu

And when I click on "Edit relation", I have this error message:

error message

And here is what I have in the url:

asked in Efficy/ Client side by (111 points)
edited by

1 Answer

0 votes

The grid tag <#G> returns the extended relation key. When multiple relations are allowed between two entities (presence of K_RELATION field), the returned value is "DetailKey_KRelation". Otherwise, it just returns the detail key.

When you use this tag to a group header, there is no key information available.

It's not clear to me what relation you are trying to open...

answered by (6.8k points)
Hello Kristof, thank you for your answer.

About the relations in this project: one project can be linked to multiple opportunities, and an opportunity can be linked to multiple records from a custom entity (called "financement").

I try to list all opportunities linked to a project, and under each opportunity, all the "financement" linked
If you group on K_OPPORTUNITY, you can use it as DetailKey argument
Yes, I saw it, but when I group on K_OPPORTUNITY, I lose the display of the opportunity name
1,166 questions
1,424 answers
325 users