Insert Successful but Update fails.
By neel | April 20, 2008
I have faced this problem quite a number of times. Below is the description of problem
Problem:
You are using upsert operation of EAI Siebel Adapter using an Integration component. When you insert a record it gets inserted successfully but if you try to update that record sending the row id of the object. It fails the error that you get is
“Record already exists. Please provide different values if you want to insert a new record”
Solution:
- If everything was working fine earlier and suddenly this has started happening, it means you have added a new field in which uses a join and the outer join flag for that join is not checked.
- If this is first time you running it then probably you have joined field which uses a join that has outer join flag unchecked.
In either case the error is due to a join with outer join flag set to false.
Reason:
Upsert operation means first find the record, if successful then update it otherwise insert the record as new record. Now to find a record a SQL query is issued.
If you forget to check the outer join flag for any of your joins then the query will return no records and your records gets successfully inserted first time but when you try updating it sending the same values again no record is returned and Siebel again tries to insert it resulting in the error message that you get.
So, the moral of the post is
Whenever you add a join in a BC make sure outer join flag is set to true.
Related Posts
Categories: Configuration, Problem-Solutions |
Subscribe by Email

(4 votes, average: 3.75 out of 5)