You need to sign in to do that
Don't have an account?
HNT_Neo
Opportunity Stage VR
Trying to create this VR on the record types shown in the code.
The idea is for only these 3 record types to trigger the VR when the picklist "Stage equals Conversion" and if the field "Total_Annual_Sqft_Interior__c" is left blank, it wll not allow the user to save the record, unless there is a value in the "Total_Annual_Sqft_Interior__c" field.
So, when I log in as a user, the validation rule seems to be triggered by any Opportunity Record type.
Can someone help me tweak this?
Please note, the "NOT($Profile.Name ="System Administrator")", is good on this VR, since I want to omit myself from this VR.
Thanks in advance!
The idea is for only these 3 record types to trigger the VR when the picklist "Stage equals Conversion" and if the field "Total_Annual_Sqft_Interior__c" is left blank, it wll not allow the user to save the record, unless there is a value in the "Total_Annual_Sqft_Interior__c" field.
So, when I log in as a user, the validation rule seems to be triggered by any Opportunity Record type.
Can someone help me tweak this?
Please note, the "NOT($Profile.Name ="System Administrator")", is good on this VR, since I want to omit myself from this VR.
Thanks in advance!
RecordTypeId = "012d0000000WK8O" /*Interior Contractor*/ || RecordTypeId = "012d0000000We79" /*Interior Dealer/Distributor*/ || RecordTypeId = "012d0000000WWPM" /*Interior Quick Convert Opportunity*/ && ISPICKVAL(StageName, "Conversion") && ISBLANK(Total_Annual_Sqft_Interior__c) && NOT($Profile.Name ="System Administrator")
try this one
AND(
OR( RecordTypeId = '012d0000000WK8O', RecordTypeId = '012d0000000We79',RecordTypeId = '012d0000000WWPM'),
ISPICKVAL(CustomerPriority__c , 'Conversion')
,ISBLANK( Total_Annual_Sqft_Interior__c ),
NOT( $Profile.Name = 'System Administrator')
)
But I think use of Record Type DeveloperName is batter than record type Id because if you use record type Id than you need to update your VR if you move it from sandbox to product.
But if you use Record Type's DeveloperName than you don't need to do this,one more thing Record Type's DeveloperName is also unique.
To get Record Type DeveloperName (Name) follow these steps
Object -> RecordType -> Name (Not Label)
In that case your VR is
AND(
OR( RecordType.DeveloperName = 'DeveloperName (Name)', RecordType.DeveloperName = 'DeveloperName (Name)',RecordType.DeveloperName = 'DeveloperName (Name)'),
ISPICKVAL(CustomerPriority__c , 'Conversion')
,ISBLANK( Total_Annual_Sqft_Interior__c ),
NOT( $Profile.Name = 'System Administrator')
)
Thanks
All Answers
try this one
AND(
OR( RecordTypeId = '012d0000000WK8O', RecordTypeId = '012d0000000We79',RecordTypeId = '012d0000000WWPM'),
ISPICKVAL(CustomerPriority__c , 'Conversion')
,ISBLANK( Total_Annual_Sqft_Interior__c ),
NOT( $Profile.Name = 'System Administrator')
)
But I think use of Record Type DeveloperName is batter than record type Id because if you use record type Id than you need to update your VR if you move it from sandbox to product.
But if you use Record Type's DeveloperName than you don't need to do this,one more thing Record Type's DeveloperName is also unique.
To get Record Type DeveloperName (Name) follow these steps
Object -> RecordType -> Name (Not Label)
In that case your VR is
AND(
OR( RecordType.DeveloperName = 'DeveloperName (Name)', RecordType.DeveloperName = 'DeveloperName (Name)',RecordType.DeveloperName = 'DeveloperName (Name)'),
ISPICKVAL(CustomerPriority__c , 'Conversion')
,ISBLANK( Total_Annual_Sqft_Interior__c ),
NOT( $Profile.Name = 'System Administrator')
)
Thanks
I used the first solution, I couldn't get the second solution to work for me.
But just curious, is this how the second one should have looked?
Thanks