Idea ID: 2705587

RAD lock.denied.msg now hardcoded to Login Name should show Full Name or use a hook to js

Status : Delivered
over 1 year ago

$L.user.name tied to Login Name of operator isn't informative in RAD lock.denied.msg and should be either changed to more user friendly field like Full Name or there should be a hook to js so customers can control Display Name.

Scenario:
In lot of customers environments login names for operators are stored as internal company IDs or some text/number strings which are not meaningful to other operators so they don't know who locked a record they are trying to update. The scmessage 1153 with class "us" will say:
Function not available, requested resource in use by: %S
where %S is taken from $L.user.name in code below which is hardcoded to login name:

$L.owner=get.lock.owner($L.resource.name)
$L.user.name=nullsub($L.owner, "unknown user/task")
$L.msg=scmsg(1153, "us", {nullsub($L.owner, "unknown user/task")})

Suggestion:

Change code on panel build.message of RAD lock.denied.msg to smth like

$L.owner=get.lock.owner($L.resource.name)
$L.user.name=nullsub(jscall("SomeLibrary.getDisplayName", $L.owner), "unknown user/task")
$L.msg=scmsg(1153, "us", {nullsub($L.owner, "unknown user/task")})

 

Tags: