You need to sign in to do that
Don't have an account?
How do I lock down two date fields?
I have two date fields that track warranty start date and warranty end date. I need to lock these down once they have a value and allow three specific Profiles the ability to edit if necessary. This is what I have so far and it works but I am not referencing the second field (Warranty End date). Thank you for your assistance!
AND(
NOT(ISBLANK(PRIORVALUE( PBSI__Waranty_Start_Date__c ))),
ISCHANGED( PBSI__Waranty_Start_Date__c ),
$Profile.Name <> "Custom Finance",
$Profile.Name <> "Custom Billing Administrator",
$Profile.Name <> "System Administrator")
AND(
NOT(ISBLANK(PRIORVALUE( PBSI__Waranty_Start_Date__c ))),
ISCHANGED( PBSI__Waranty_Start_Date__c ),
$Profile.Name <> "Custom Finance",
$Profile.Name <> "Custom Billing Administrator",
$Profile.Name <> "System Administrator")
Try the below formula:
AND(
OR(NOT(ISBLANK(PRIORVALUE( PBSI__Waranty_Start_Date__c ))),NOT(ISBLANK(PRIORVALUE( PBSI__Waranty_End_Date__c )))),
OR(ISCHANGED( PBSI__Waranty_Start_Date__c),ISCHANGED( PBSI__Waranty_End_Date__c)),
$Profile.Name <> "Custom Finance",
$Profile.Name <> "Custom Billing Administrator",
$Profile.Name <> "System Administrator")
Can you please Let me know if it works or not and also If you face any problems!!!
If it works don't forget to mark this as a best answer!!!
Thanks,
Raj
Hello Maharaja,
The fields are not locking down. Users are still able to change them. Is there prior value logic that can be included to revert the dates back if they change?
Thank you!
The formula is working fine to me against your requirment in mydev org:
AND(
OR(NOT(ISBLANK(PRIORVALUE( PBSI__Waranty_Start_Date__c ))),NOT(ISBLANK(PRIORVALUE( PBSI__Waranty_End_Date__c )))),
$Profile.Name <> "Custom Finance",
$Profile.Name <> "Custom Billing Administrator",
$Profile.Name <> "System Administrator")
If you include the ISCHANGED function you can edit the field but you can't the change the value on the field then if you don't include the ISCHANGED function simply you can't edit also.
And just to be clear:
The above validation no need to fire for intial values are filled in record i.e when it is changed from null to values?
And Only it is need to fire in the second time after the value entered by anyone in field right except the three profile?
And one more suggestion If you dont want to allow any users to enter the value except the three profile then remove the PRIORVALUE function line in formula but keep the ISCHANGED function.
Can you please Let me know if it works or not and also If you face any problems!!!
If it works don't forget to mark this as a best answer!!!
Thanks,
Raj