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
- :
- Jobs Board - Force.com Developers and Admins
- :
- execution of BeforeUpdate caused by: System.FinalE...
turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
0
execution of BeforeUpda te caused by: System.Fin alExceptio n: SObject row does not allow
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-07-2012 04:01 AM
trigger restrictHindiTeacher on Contact (before Insert, before Update) {
List<Contact> conNewList = trigger.new;
List<Contact> conOldList = trigger.old;
if(conNewList[0].subjects__c == 'hindi'){
conNewList[0].addError('Teacher REstricted');
}else if(conOldList[0].subjects__c == 'hindi'){
conOldList[0].addError('Teacher REstricted');
}
}
This code is working when I add subject hindi to picklist but doesn't work when remove hindi from piicklist.
Means is working while trigger.new but not while trigger.old

