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
HNT_NeoHNT_Neo 

Stop a Profile from creating an Account record type...

On the Account tab there is a new button which allows a user to create an account, then selecting an Account Record Type, according to there profile. I'm trying to limit a few profiles from creating a certain type of account record type, how can I go about this? OR is can this rule be written so that only the System Admin can create these types of Account record types? I want to ensure the profiles are still able to create Accounts from the other numbers account record types we've setup without any interruption. Thanks in advance. 

Object: Account

Record Type ID: 012d0000000WFah

Profile ID's needing to block from creating the Account - Interior Record Type: 00ed0000000iCZS, 00ed0000000ie5Z, 00ed0000000jaFj

System Admin Profile ID (if needed): 00ed0000000vi78

 

Best Answer chosen by HNT_Neo
HNT_NeoHNT_Neo
AND ( 
$Profile.Id = "00ed0000000iCZS", 
$RecordType.Id = "012d0000000WFah", 
ISNEW() 
)

All Answers

Shashikant SharmaShashikant Sharma
You could go to those profiles and configure them such that they do not have access to those record types.

Steps:
1. Go to profile 
2. Go to Record Type Settings
3. Click Edit link for the Account Record Type
4. Remove the record types from Selected Record Types

Thanks
Shashikant
HNT_NeoHNT_Neo
I still need the profiles to have access to the record types. They will still need edit rights to existing records, just need a way for the profiles not to create new accounts with the listed record type id.
K_McRaeK_McRae
JH_Neo,

You could use a validation rule on the Account object.

This one will prevent anyone with a certain profile from being able to save anything:

IF( $User.ProfileId = '00e20000001UfIQ', TRUE, FALSE )

You can extend this to limit the effect to certain record types.

Keith
HNT_NeoHNT_Neo
I still need all profiles to save the record. Just not create a certain Account Record Type. The system admin will be the only user able to create the 1 Account Record Type, while the user will still have access to edit it, just not create it. 
K_McRaeK_McRae
JH_Neo,

You can access the Record Type is a simliar manner using either:
$RecordType.Name
$RecordType.Id

Also look at the ISNEW() function which checks if the formula is running during the creation of a new record and returns TRUE if it is. If an existing record is being updated, this function returns FALSE.

A combination of these functions will be able to, via a validation rule, stop people creating new records but not prevent them from updating them.

Keith
HNT_NeoHNT_Neo
AND ( 
$Profile.Id = "00ed0000000iCZS", 
$RecordType.Id = "012d0000000WFah", 
ISNEW() 
)
This was selected as the best answer
mhittmhitt
Hello,

I am trying to do this same thing, but I am unable to make the formula above work. Just to be sure, is this being inserted into the validation rules formula on the Account object? Also, I replaced your Profile ID and Record Type ID with my own.

Thanks for the help,
HNT_NeoHNT_Neo
I actually have changed it to use a custom setting. But originally it was a validation rule setup within the account object. My new Validation Rule looks like this; AND ( $RecordType.Id = "012d0000000WFah", ISNEW(), (NOT($Setup.Validation_Override__c.Bypass_Validation_Rules__c)) )