You need to sign in to do that
Don't have an account?
Chris Husted
Prevent Specific Contact Record Type for Being Deleted
Hello -
I'm trying to prevent ONLY one record type of Contacts ('Client') using a visualforce page redirect.
Here is my code so far, which is not allowing deletion of any Contact record types:
<apex:page action="{!if($User.Alias !='admin',
null,
urlFor($Action.Contact.Delete, $CurrentPage.Parameters.id, [retURL='/00T'], true)
)
}"
standardController="Contact">
<apex:pageBlock >
<apex:PageMessage summary="You are not allowed to delete Client Contacts"
severity="Warning"
strength="3"/>
<apex:pageMessages />
</apex:pageBlock>
</apex:page>
Any advice on how to apply only the one record type ID we want to prevent from being deleted would be great.
Thanks!
-Chris
I'm trying to prevent ONLY one record type of Contacts ('Client') using a visualforce page redirect.
Here is my code so far, which is not allowing deletion of any Contact record types:
<apex:page action="{!if($User.Alias !='admin',
null,
urlFor($Action.Contact.Delete, $CurrentPage.Parameters.id, [retURL='/00T'], true)
)
}"
standardController="Contact">
<apex:pageBlock >
<apex:PageMessage summary="You are not allowed to delete Client Contacts"
severity="Warning"
strength="3"/>
<apex:pageMessages />
</apex:pageBlock>
</apex:page>
Any advice on how to apply only the one record type ID we want to prevent from being deleted would be great.
Thanks!
-Chris
Yes. I removed the "Delete" button from the page layout for this record type then realized I need to do the same for the "Delete" option on the Related List view for this record type only.
Thanks!
I am trying to do something similar. Where you able to find a workaround to identify record types ?