You need to sign in to do that
Don't have an account?
Mig
My trigger works fine when it returns data. But sometimes The query return anything and I've got this problem.
BonusTrigger: execution of BeforeUpdate caused by: System.QueryException: List has no rows for assignment to SObject:
When this query returns anything I've got a problem. How to solve it ?
Thank you in advance for your help
Message Edited by Mig on 03-18-2008 05:32 PM
APEX : List has no rows for assignement to SObject problem
My trigger works fine when it returns data. But sometimes The query return anything and I've got this problem.
BonusTrigger: execution of BeforeUpdate caused by: System.QueryException: List has no rows for assignment to SObject:
Code:
Bonus_definition__c[] bonusdef = new Bonus_definition__c[1]; /* definition of all the vars Bonus_definition__c s = [Select b.id, b.Convertion_Rate__c, b.BonusCurrency__c From Bonus_definition__c b where b.Year__c =:bonusyear and b.BonusCurrency__c =:curr limit 1];
When this query returns anything I've got a problem. How to solve it ?
Thank you in advance for your help
Message Edited by Mig on 03-18-2008 05:32 PM
All Answers