ray20 wrote:
is there anyway that we could change the font color of “Credit Hold” to RED? Only this single element. No other fields. And also it is only red when it is “Credit hold”, it remains black when open or completed.
Yes, one need to rely on Javascript for such purpose. See example below:
<px:PXDataSource>
...
<ClientEvents CommandPerformed="changeStatusColor" />
</px:PXDataSource>
<script type="text/javascript">
function changeStatusColor(sender, e) {
var edStatus = px_all["ctl00_phF_form_t0_edStatus"];
var edStatusControl = document.getElementById("ctl00_phF_form_t0_edStatus");
if (edStatus && edStatus.value == "N")
edStatusControl.style.color = "#FF0000";
else
edStatusControl.style.color = "#00FF00";
}
</script>
Here, CommandPerformed is raised whenever record is acted upon in terms of loading, navigating, refreshing, actions, etc. e.command can be checked to see what raised this event.