Visible attachment

Nisha28
Tera Contributor

Hello All,

I have requirement that attachment for one particular catalog Item for eg. xyz if someone attach the attachment at task level for the item 'xyz' then only it should vissible to assignment group 'abc' and if the logged in user belong to company "DEF'.

How we can acheive this and it should work only for the catalog item 'XYZ' should not impact anywhere else.

Is this possible 

 

Thanks and Regards,

Nisha

5 REPLIES 5

Ravi Peddineni
Kilo Sage

@Nisha 

 

You can write a ACL on attachment table to hide it based on RITM fields. 

There is also another not so popular and not suggestable method that is to have a client script where you will have to modify element html.

Hello Ravindranath,

 

Can you please help with this how we can implement as I want to hide attachment on catalog task. Based on user company

@Nisha 

 

Navigate to sys_attachment.LIST and create a READ ACL by going into table configuration page. 

In script field, use the below script:

if(current.table_name == 'sc_task'){

    var grUser = new GlideRecord('sys_user');
    grUser.get(gs.getUserID());

    if(grUser.company == '<user your compnay or add required conditions>'){
        
        answer = true


    } else {

        answer = false;


    }

} else {

    answer = true;


}

@Nisha 

Did this work as expected?