My ultimate goal is to change the background color of the Batch Payment screen grid based on two Boolean fields (UsrIsVendorVerified and UsrIsExcludeFromVerification) in CABatchDetailExt.
I attempted to achieve this using a JavaScript attribute, following the guidance from the post:
How do I add row highlighting to a customization contained within a Base Acumatica BLC?
Since that approach did not work as expected, I tried a simpler test coloring the grid rows without applying any conditions. However, even this did not work.
Script:
function HighligthLines ()
{
if(px_all && px_all["grid"] && px_all["grid"].rows)
{
let lines = px_all["grid"].rows.items;
for(let i=0;i<lines.length;i++)
{
let currentLine=lines[i];
currentLine.style.CssClass = "red20";
currentLine.repaint();
}
}
}
The Grid control doesn’t support a PXJavaScript attribute, so I added the PXJavaScript attribute to the form on the Batch Payment screen instead the Batch Payment grid is not contained inside a Tab attribute, so attaching the script directly to the grid wasn’t possible
For testing purposes, I also applied the same logic and method to the Journal Voucher screen in an attempt to color the Transactions grid, but that did not work either. The customization project is attached for reference.