+ Start a Discussion
DishaDisha 

I have removed the edit permissions from that object still I am able to see the edit / del buttons on related List.Can anyone help me in this please?

Best Answer chosen by Disha
AshlekhAshlekh
Hi,

You car write a trigger on Opportunity Product.

You can create a custom setting in which you can maintain which profile or user can edit/delete the Opportunity Products and then write a code in trigger and check current logged in user 's profile or user id is in your custom setting or not.

-Thanks
Ashlekh Gera

All Answers

Agustina GarciaAgustina Garcia
Hi,

How did you remove these righst?

I already created a new Profile and made sure that my objects Factura (father) and Factura Line (child) will have Edit / Delete and Modify All rights removed. 

User-added image

Then created a new user with this new profile and accessed to the org with this user. As you can see in the below image, the only button that I have avilable is Clone one, but Edit and Delete have disapeared.

User-added image

Let me know if this doesn't help
DishaDisha
Hi,

Yes, I did in the same way.
I did this for Product Object. Still I am able to see edit/ Del Button for Oppotunity Products on the Opportunity related list.
Do we have to do something different for opportunity Products Object as it is child Object for Opportunity.
I am not able to find out opportunity product Object on profile page. I can see only Product and Opportunity.

Thanks,
Disha
Chandra Prakash PandeyChandra Prakash Pandey
Hi Disha,

If you've revoked edit/delete privileges from any profile in a similar manner as Augustina explained, then the user with that profile can't edit/delete that object records until unless users don't have any extra permission set assigned to them with edit/delete permissions or user doesn't have "System Administrator" profile.
Check and verify if your user has "System Administrator" Profile or any other Permission Set.

Regards,
Chandra Prakash
Agustina GarciaAgustina Garcia
Disha, Chandra's observation is really good. Even if we have removed all rights from the profile, if the user has not assigned this profile or it has a permission set with the availability to edit/delete, this would override the profile rights.

I have tried with your objects, Opportunity and Opportunity Lines. And it is true, that related list doesn't have a entry in the profile from where you can remove edit / delete rights. I made it work but only removing rights from Opportunity itself. Remember that Product Line (Opportunity Lines) is a really special object with its own rules.

User-added image

User-added image

But this also mean that you would not be able to edit / delete the Opportunity.

Hope this time helps.
 
AshlekhAshlekh
Hi,

Actually the Opportunity is Master of Opportunity-product object and so the sharing is controlled by Opportunity Object.

-Thanks
Ashlekh Gera
DishaDisha
Thank You all for Sharing your thoughts.
Is there any way to restrict user from edting only Opportunity Product not Opportunity?

Regards,
Disha
AshlekhAshlekh
Hi,

You car write a trigger on Opportunity Product.

You can create a custom setting in which you can maintain which profile or user can edit/delete the Opportunity Products and then write a code in trigger and check current logged in user 's profile or user id is in your custom setting or not.

-Thanks
Ashlekh Gera
This was selected as the best answer
Beth BergmeierBeth Bergmeier
Hi - I know this is an old post from 2015 but did you ever get this to work?

I am noticing the same type of issues - people able to change the pricing on a opporutnity who shouldn't...when I look at the profiles I have:
  • removed the access for them to Edit Opportuinity Product Sales Price under Admin Permissions
  • Object Permissions I have ensured they only have read access to the Price Book, Products, and we don't use Orders so they can't even view Orders
  • When I go to the Products field level security these fields box under "Edit" column is not editable
    • Order
    • Product
    • Quantity
    • Unit Price
My question where do I go to remove the edit capabilities for those fields and just give the user read access?

Thanks,
Beth
Beth BergmeierBeth Bergmeier
Disregard - found my answer elsewhere - it has to do with CRUD -Opportunity Product shares it with the Opportunity Object so I have to write a validation rule to stop users.