If we have requirement to user should not select last friday of every month as appointment date and if selected then show appropriate message on record in salesforce. This we can achieve using custom validation rule. Following validation rule condition we can use:
- Validation Rule Conditions:
(WEEKDAY( Appointment_date__c ) = 6 ) &&
((DATE(YEAR(ADDMONTHS( Appointment_date__c , 1)) ,
MONTH(ADDMONTHS( Appointment_date__c ,1)) ,
1) - Appointment_date__c ) <= 7 )
MONTH(ADDMONTHS( Appointment_date__c ,1)) ,
1) - Appointment_date__c ) <= 7 )
No comments:
Post a Comment