Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 7974

Questions relating to Apex, the native programming language for the Force.com platform. Use it for general questions on syntax, errors, constructs, and rules of use. Most questions should include a code *excerpt* to help answerers understand specifically what has gone wrong or why you need help.

2 votes
2 answers
4k views

Bypassing Validation Rules for User/Profile with Apex Test Code

I have some legacy test classes that I'm updating. One of these get's hung-up by a validation rule that requires a record only be changed by certain users/profile. Now, I understand that test classes …
Doodereeno66's user avatar
1 vote
3 answers
431 views

Invalid Foreign Key Relationship when referring to custom object text field

Hopefully this is a simple one, but I'm pretty stumped. Basically, I'm editing a text field of a custom object. However, it seems I get a Invalid Foreign Key Relationship error when I try and check wh …
Doodereeno66's user avatar
0 votes

Invalid Foreign Key Relationship when referring to custom object text field

Looks like the answer is !String.isEmpty(o.Name) (as it states in the documentation :/)
Doodereeno66's user avatar
2 votes
1 answer
760 views

Field Validation Exception and Database Class vs DML Statements

I'm trying to write a trigger and having some real trouble in making it work. Background: we adopted the Country/State picklist "Feature" last year. All the cleanup wasn't done. We have some records …
Doodereeno66's user avatar