Form called from grid and gets set a field to readonly for some users

A user selects from an address list (grid) a person details. If the user is that person he may change the data, all others may only see the data readonly.
sc_apl_conf provides this functionality but I has to be executed in an app different to the above mentioned form.

How can I execute the sc_apl_conf it in the calling grid as I have no way of telling whant application link is clicked?

It is not quite true that sc_apl_conf has to be used in the application calling another.

You can also use it in the onApplicationInit Event of the called application.

Sample:

Thus you can call the form and pass the user which is allowed to see fields (or similar).
Check in onApplicationInit and call the sc_apl_conf…

I hope this will help.

Best

Gunter Eibl

Thank you for the important information that corrects the documentation.

My new problem: If I call the form the fields that where previously set to readonly (by sc_app_conf) do not revert to normal mode of read-write.
Any ideas how to correct?

The proposition of Gunter may work for his purpose, for setting a field readonly it does not work.
I tried to solve the problem using a blank form where the sc_appl_form is executed and the redir to the form.
This works but thr return is the problem:
in the blank form ->onExecute:
$personId=[person_id]; //key for the table to be use in form
if( $personId == ‘’){
sc_exit();
}
in the form app a button is defined to exit (php):
[person_id]=’’; //empty the key;
sc_exit();

Result: It exits the form but terminates and opens a new project window

My Problem is unresolved: "the logged in user may update his address fields (displayed in a detail FROM), all others will see the fields of the form in readonly.

I would put an onLoad event on the target form something like this:

if ({selectedUser} <> [gloLoggedInUser]) {
sc_btn_display(“update”,“off”);
sc_btn_display(“delete”,“off”);
} else {
sc_btn_display(“update”,“on”);
sc_btn_display(“delete”,“on”);
}

i.e. turn off the Update and Delete buttons