Friday, July 16, 2021

Apex - Alternative background record color change

 .a-GV-table .a-GV-row:nth-child(even) .a-GV-cell {

    background-color: #d2e0f9;

}


Add this in report inline



Apex - solution to add leading zeros

 function pad(

  x, // input number to pad
  y // input number for trunc
){
  return (
    1e16 + x + "" // concatenate a big number to the input number and converting to string
  ).slice(-y) // trunc last Y numbers
}

Output

pad(1,2) => 01
pad(123,2) => 23
pad(123,5) => 00123

APEX edit icon and needed code for this to display



 <span aria-label="Edit"><span class="fa fa-edit" aria-hidden="true" title="Edit"></span></span>



Output