Only display 'Edit' link on certain rows on apex report

感情迁移 提交于 2019-12-02 04:45:22

Usally i use something like this:

  1. In "Edit Column" -> "Column Link" -> "Link Attributes" add the folowing string:

    class="#TYPE#"
  2. Add this css style to your page:

    .sales_target { display: none; }

Your link will look like:

<a href="#" class="sales_target">sales_target_edit</a>
 or
<a href="#" class="sales">sales_edit</a>

All links with class="sales_target" will hide.

Setting the condition on a column will cause the column to be either displayed or not for the whole column, not for a specific row.

One possible solution might be to remove the extra column link through javascript. Run this code in a dynamic action, after refresh of the report. Execute javascript, execute on page load checked. I gave my report region a static id, which is "rStatic" in the code.

$("#report_rStatic .report-standard td[headers='TYPE']").each(function(){
  if($(this).text()=='SALES'){
    $(this).closest('tr').find("td[headers='EDIT_RECORD'] a").remove();
  };
});

This will loop over all cells in the TYPE column, and when the type is SALES it will remove the anchor tag in the EDIT_RECORD column.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!