Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Formulas & Validation Rules Discussion
- :
- Re: Need validaution rule for below scenario?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Need validautio n rule for below scenario?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-08-2012 01:00 AM
Re: Need validautio n rule for below scenario?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-08-2012 03:48 AM
Somewhat complex to achieve but not impossible .
You better add a Date picklist along with Month and year .
Then Add a formula field(suppose X) which concatenates Year ,month and date according to picklists .You may hide this field from page layout.
Now use DATEVALUE(X) function to find the date and compare that with TODAY() .
Try this and let me know if it working or not.
Re: Need validautio n rule for below scenario?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-08-2012 04:01 AM
Can you post the format how the Month and Year are stored in Picklist?
Madhan Raja M
Re: Need validautio n rule for below scenario?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-08-2012 07:40 AM
A better solution might be to just have a date field that they fill in. Then a validation rule that makes sure that date is last month. The formula could be
OR (
YEAR( Attended_Date__c ) <> YEAR ( TODAY() ),
MONTH( Attended_Date__c ) <> MONTH ( TODAY() ) - 1
)
Then if you want the month and year fields to be pulled out for some other purpose, create formula fields for that like below.
MONTH( DATEVALUE(Attended_Date__c) )
YEAR( DATEVALUE(Attended_Date__c) )

