Solved

Excel Migration Job - integrity constraint error

  • 16 January 2023
  • 6 replies
  • 237 views

Badge +3

I have a Migration Job that uses the Excel Add-In and some of the custom fields are linked to views/tables, so I understand that the “_DB” value will be that of the OBJKEY/ROWKEY.  What I don’t understand is why I am receiving an integrity constraint error for NULL entries of the “_DB” columns.  

one of my errors: “integrity constraint (IFSAPP.BUSINESS_OPPORTUNITY5_CRK) violated - parent key not found”

how can one prevent this for NULL values for non-mandatory custom fields?

 

Sincerely,

Vince K.

icon

Best answer by Makede 19 January 2023, 16:55

View original

6 replies

Userlevel 4
Badge +10

Hi @VT_VKOLB ,
Can you please post a hardcopy of the tab method list to see your configuration 
Thanks
Martina

Badge +3

 

 

the two pairs are just one example of the system not ignoring a NULL value, but still performing the constraint check

 

 

 

Userlevel 4
Badge +10

The setup in the migration job depends on what kind of custom field you are trying to migrate.

First option is that the custom field is a persistent field with free text (no references, enumerations, etc. behind it).

Here you can simply map your value to the field and it should be transferred

 

When you have a referenced custom field you need to migrate the objkey of the referenced field into the _DB field of the custom field

An example:

I have a custom field referencing to the view CUSTOMER_INFO. Then I map the _DB field and in this case I used a subselect to fetch the objkey from the referenced view. You could also use a get functionality if available. In this case it would be customer_info_api.Get_Objkey(customer_id)

 

Badge +3

so my issue is not when I have a value for the _DB column.  but I like what I see in your code

my issue is when NULL exists for the _DB column and it is not a mandatory column.   We get the error that we are violating the constraint.   makes no sense.  it is like we need a way to tell the processing to not process these types of columns if NULL exists.   

 

I hope I am making sense

Userlevel 4
Badge +10

@VT_VKOLB  
Normally there shouldn’t come up an error message that you violates the key when the value is empty
The error message comes up when
1. The opportunity where the custom field is connected to is not found
2. You have a not existing value in your _DB field

In your hardcopy I can see that there are some “Missing optional...” values. Could you please remove them and try again?
 

 

Badge +3

Makede, thanks!!   I am embarrassed that I did not catch that myself.  🤦 

Reply