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 70567

A controller extension is an Apex class that extends the functionality of a standard or custom controller.

1 vote
1 answer
328 views

Error when I try to create OrderItem records Insert failed. INVALID_CROSS_REFERENCE_KEY

I'm trying to create a visualforce page where a user can create multiple OrderItem records at the same time. The error that I get is OrderItem records Insert failed. First exception on row 0; fi …
Chandlerbeen's user avatar
1 vote
Accepted

Error when I try to create OrderItem records Insert failed. INVALID_CROSS_REFERENCE_KEY

I think I found the problem. I found that order has a Pricebook2Id field that need to be populate to create OrderItem records linked to it.
Chandlerbeen's user avatar