function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PrateekPrateek 

Facing Problem Regarding Override Button Functionality

In my project, i have relationship of pre-project with Opportunity object. Pre-project is a custom object. My functionality is,i want to create Pre-project only through the Opportunity object. it should not be create by Pre-project tab directly.

 

When someone will click on Pre-project New button directly it will show a error message and when someone will

go through the opportunity, he can do easily.

 

Please help me to solve this problem.

 

Thanks in advance!

 

kritinkritin
What is the relationship in your custom object and Opportunity. I think you can aceive your requirement by adding related list custom object in your Opportunity page layout simply and remove the Custom object Tab permission view from all the profiles.
MauricioArdilaMauricioArdila

yeah removing the tab will do the trick. if you must have the tab, then create a trigger that validates how you create the object.