0 votes

During a migration from Efficy 2012 to Efficy 11.1 The following code in a serverscript gives an Overflow error :

Message: "Overflow while converting variant of type (Double) into type (Integer)"

The code which throws this error :

var editSource = Efficy.OpenEditContextRelation(ntOppo, ntProd, k_Opportunity, K_Product, k_Relation);

Parameters passed to the functions are the following:

Key = 203703

DetailKey = 17012

K_Relation = 752975747 (which is stored in the SQL DB as an int correctly)

Is there a reason why this doesn't work properly in Efficy 11.1?

asked in WorkFlow / Serverscript by (607 points)

2 Answers

0 votes

Does this happen for every value of K_RELATION ?

Can you show a script function that can be run in the scheduler that generates the error?

answered by (836 points)
if I isolate the script in the Task Scheduler  i don't get an error...
It was in fact related to the  main key that wasn't picked up correctly from the arguments.
 Sys_fields was correctly configured
0 votes

Could it be that there is a field in the relation PROD_OPPO that is defined in SYS_FIELDS with DATATYPE='I' but as float/number in the database? DbUpgrade ignores those cases.

The casting error might be related to another field and not K_RELATION.

answered by (6.8k points)
It was in fact related to the  main key that wasn't picked up correctly from the arguments.
Sys_fields was correctly configured
1,165 questions
1,423 answers
1,715 comments
325 users