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

后端 未结 2 963
攒了一身酷
攒了一身酷 2021-01-23 09:52

I have the following report structure which shows sales targets and sales for products throughout the year.
Each product will have two rows: a row showing sales and a row sh

相关标签:
2条回答
  • 2021-01-23 10:10

    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.

    0 讨论(0)
  • 2021-01-23 10:24

    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.

    0 讨论(0)
提交回复
热议问题