Hi,
What would be the best way of selectively locking fields on a screen on the SmartClient?
I am trying to disable certain fields on the project screen depending on the project status. This script below almost works, but diesnt lock the Notes tab records. Is there a better way of doing this? essentially, if the project is approved, the details cant be updated by everyone, only certain people (who use a different project screen).
We cant use the app param ‘FREEZE_PROJECT_APPROVAL_STATUS’ as some people will be allowed to update but not others. The ones that it will be disabled for still need to be able to update the proect for any other status.
var lockFields=false;
var projectApprovalStatus = getControlValue("project","approval_status");
if(projectApprovalStatus=="APPROVED"){
lockFields=true;
}
if(lockFields){
setControlEnabled("project","project_title",false);
setControlEnabled("project","place_id",false);
setControlEnabled("project_text","text_id",false);
setControlEnabled("project_text","text_line_code",false);
setControlEnabled("project_text","text_rtf",false);
} else {
setControlEnabled("project","project_title",true);
setControlEnabled("project","place_id",true);
setControlEnabled("project_text","text_id",true);
setControlEnabled("project_text","text_line_code",true);
setControlEnabled("project_text","text_rtf",true);
}