Reply
Regular Visitor
kittu@SalesforceDiscussion
Posts: 2
0

Hiding Edit Action on related list of one object and showing on the other.

 I have 3 objects, A,B,C. C has a lookup relationship with A and B. A and B are masters, ie C appears as a related list on A and B detail page. I want to hide the Action column (Edit |del) for C related list which appears on A but not for C's related list which appears on B.

I dont want to write a controller class for vf page.

 

Tried the following:

1)I tried writing vf page with javascript and overidding the Edit action of C. But it overrides both C's related list on A & B' s   detail page. 

 

2) Tried writing a Worflow which can change the Record Type in turn Pagelayout to 'Read Only' , so that User may not be able to edit the record of C's related list on A's detail page, but can view the reord. But this also isn't working. 

 

3) Also I tried to use sforce.connection.query in javascript to check the record of C whether it belongs to A or B detail page. If it belongs to A then Edit Action should be disabled else if it belongs to B's detail page, edit should be enabled. 

 

Kindly suggest some solution.

Super Contributor
sfdcfox
Posts: 3,892
0

Re: Hiding Edit Action on related list of one object and showing on the other.

There's no real way to enable/disable those action features like that, unless the users truly should not be able to edit/delete those records, in which case, change their profile so they do not have Update/Delete permission on B and C. they will be able to create new entries only (given Read and Create).

~ sfdcfox ~


I am a sandwich. That is all.

Regular Visitor
kittu@SalesforceDiscussion
Posts: 2
0

Re: Hiding Edit Action on related list of one object and showing on the other.

Again if I would with your solution ie changing the profile permission for that user. The user wont be able to edit on both related list (C) of A as well as B.