You need to sign in to do that
Don't have an account?
Fahad Khan 2
common.exception.SfdcSqlException: Invalid column index
I have a custom object and using dataloader records get loaded. on create i have a trigger that does some processing and creates/update product2 records. Most of the times trigger runs successfully but sometimes i get the following error:
RawAircraftTrigger: execution of AfterInsert
caused by: System.UnexpectedException: common.exception.SfdcSqlException: Invalid column index
Class.RawAircraftsTriggerHandler.loadCrafts: line 58, column 1
Trigger.RawAircraftTrigger: line 3, column 1
My line 58 starts as follows
I am clueless what could be the main issue here.
RawAircraftTrigger: execution of AfterInsert
caused by: System.UnexpectedException: common.exception.SfdcSqlException: Invalid column index
Class.RawAircraftsTriggerHandler.loadCrafts: line 58, column 1
Trigger.RawAircraftTrigger: line 3, column 1
My line 58 starts as follows
for(Account a : [Select id, Name, Account_Name_2__c from Account where Name in :accountKeys OR Account_Name_2__c in :accountKeys]) { existingaccounts.put(a.Name, a); existingaccounts.put(a.Account_Name_2__c, a); }
I am clueless what could be the main issue here.
May I suggest you please refer the below link for reference.
- https://salesforce.stackexchange.com/questions/18651/batch-apex-throwing-error-when-executing-query-sqlexception-common-exception
Hope it will be helpful.Please mark it as best answer if the information is informative.
Thanks
Rahul
Here is my code. and it fails sometimes on line 58.
Thanks a lot for the suggestion Rahul, you are totally correct about the issue being similar to the one that you share a link to, but the cause of this problem totally doesn't match, his issue was resolved by removing "!= null" from where clause, and I don't have that in place. I am still clueless. and Salesforce support won't allow me to raise a development related issue by logging a case.