Disable edit link on a grid programmatically

Hi,
I’ve the typical grist with the pencil button that makes a link to a form app to edit. I’ve a system privileges that don’t allows to open the form app to edit, but the same user cans see the grid. There’s any way to disable programmatically the pencil link depending on an if condition using a scripcase macro?
Thanks,

Dani

Wonder if you’ve found an answer to this?

[SOLVED] Yes, I’ve found, it’s done with the macro sc_apl_conf() in the onApplicationInit or onScriptInit events:


if([priv]==0) {
sc_apl_conf(grid_app, lig_edit, off);
}

Good luch!