You can show the tab based on the permission set assignment and when you want to hide/remove this you can delete the permission set assignment record from apex. It woould be good if you can share some more details.
As you suggested, trying to assign permission sets through Apex.
When I checked first level, level one permission set should assign. when I checked second level, second one should get assign and previous one should get delete.
@Abhishek,
Thanks for that, but I want to hide specific tab not all tabs.
It woould be good if you can share some more details.
Sample Code:
<apex:page wizard="true">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >Name<apex:inputText /></apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Store"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Output:
For further reference, you can check this blog (http://Sample Code: <apex:page wizard="true"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > <apex:pageBlockSectionItem >Name<apex:inputText /></apex:pageBlockSectionItem> </apex:pageBlockSection> <apex:pageBlockButtons > <apex:commandButton value="Store"/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>).
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks
@Abhishek Bansal,
As you suggested, trying to assign permission sets through Apex.
When I checked first level, level one permission set should assign. when I checked second level, second one should get assign and previous one should get delete.
@Abhishek,
Thanks for that, but I want to hide specific tab not all tabs.