Hide/show buttons with list control

Leonel Sandroni
Tera Guru

Hi there,

I'm trying to hide or show buttons and links from related list so I have tried with scripts in 'omit conditions'.

The requirement is very simple. Users, who have ACL write permissions for parent record, should be able to create or edit related list records. 

I have achieved  to hide links for users that have no permissons but it's not working with the 'New' button

LeonelSandroni_0-1689693696211.png

This is the script which I have write for both conditions:

var omit = true;


if (current.parent.canWrite()) {


  omit = false;


}



answer = omit;

 

and as I mentioned it works for 'omit links' but not for 'omit new'

Any suggestion?

9 REPLIES 9

Ranjit Nimbalka
Mega Sage

Hi @Leonel Sandroni 

try this:-

var omit =false;
if (current.parent.canWrite()) {
  omit = true;
}
omit;

 

Regards,

Ranjit

I appreciated your helpful but it doesn't work

Sudarshan1
Tera Contributor

I do have similar question

 

I have not found the solution yet. Please, let me know if you find it. It's strange because the script I wrote, works correctly for "omit links condition" but not for "omit new condition".