• Yuhai Huang
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Set<String> setConcurReportIds = new Set<String>();
for (Expense_Cache__c eCache: lstec_existed_merge) {
System.debug(' ec.Concur_Report_Id__c is here ' + ec.Concur_Report_Id__c);
System.debug('eCache.Concur_Report_Id__c is here ' + eCache.Concur_Report_Id__c);
System.debug('eCache.Expense_Report__c is here ' + eCache.Expense_Report__c);

line 725: if (eCache.Concur_Report_Id__c == ec.Concur_Report_Id__c && eCache.Expense_Report__c != '') {     setConcurReportIds.add(eCache.Expense_Report__c);
} }

Concur_Report_Id__c is text type.
Expense_Report__c is lookup id.

Can anybody help find out why the invalid id error happens?

16:00:57.26 (1446525074)|SYSTEM_METHOD_ENTRY|[722]|System.debug(ANY)
16:00:57.26 (1446530656)|USER_DEBUG|[722]|DEBUG|    ec.Concur_Report_Id__c is here 401328
16:00:57.26 (1446536314)|SYSTEM_METHOD_EXIT|[722]|System.debug(ANY)
16:00:57.26 (1446539625)|STATEMENT_EXECUTE|[723]
16:00:57.26 (1446546287)|HEAP_ALLOCATE|[723]|Bytes:41
16:00:57.26 (1446552175)|SYSTEM_METHOD_ENTRY|[723]|System.debug(ANY)
16:00:57.26 (1446555285)|USER_DEBUG|[723]|DEBUG|eCache.Concur_Report_Id__c is here 401328
16:00:57.26 (1446559344)|SYSTEM_METHOD_EXIT|[723]|System.debug(ANY)
16:00:57.26 (1446562165)|STATEMENT_EXECUTE|[724]
16:00:57.26 (1446583131)|SYSTEM_METHOD_ENTRY|[724]|String.valueOf(Object)
16:00:57.26 (1446589079)|HEAP_ALLOCATE|[724]|Bytes:18
16:00:57.26 (1446600036)|SYSTEM_METHOD_EXIT|[724]|String.valueOf(Object)
16:00:57.26 (1446604857)|HEAP_ALLOCATE|[724]|Bytes:51
16:00:57.26 (1446609913)|SYSTEM_METHOD_ENTRY|[724]|System.debug(ANY)
16:00:57.26 (1446613386)|USER_DEBUG|[724]|DEBUG|eCache.Expense_Report__c is here a1G6F000003VESYUA4
16:00:57.26 (1446618236)|SYSTEM_METHOD_EXIT|[724]|System.debug(ANY)
16:00:57.26 (1446768110)|HEAP_ALLOCATE|[725]|Bytes:16
16:00:57.26 (1446787793)|METHOD_EXIT|[397]|01p90000006RpI3|dldcExpenses.getExpenseReport(Expense_Cache__c)
16:00:57.26 (1446797257)|SYSTEM_MODE_EXIT|false
16:00:57.26 (1446804851)|METHOD_EXIT|[26]|01p90000006RpI3|dldcExpenses.Create(List<Expense_Cache__c>)
16:00:57.26 (1446883993)|FATAL_ERROR|System.StringException: Invalid id: 

Class.dldcExpenses.getExpenseReport: line 725, column 1
Class.dldcExpenses.Create: line 397, column 1
Trigger.dldcConcurExpenseUpload: line 26, column 1
16:00:57.26 (1446898598)|FATAL_ERROR|System.StringException: Invalid id: 

I tried hard and can't any reason Invalid Id error happens.

Can anybody help on this?
Set<String> setConcurReportIds = new Set<String>();
for (Expense_Cache__c eCache: lstec_existed_merge) {
System.debug(' ec.Concur_Report_Id__c is here ' + ec.Concur_Report_Id__c);
System.debug('eCache.Concur_Report_Id__c is here ' + eCache.Concur_Report_Id__c);
System.debug('eCache.Expense_Report__c is here ' + eCache.Expense_Report__c);

line 725: if (eCache.Concur_Report_Id__c == ec.Concur_Report_Id__c && eCache.Expense_Report__c != '') {     setConcurReportIds.add(eCache.Expense_Report__c);
} }

Concur_Report_Id__c is text type.
Expense_Report__c is lookup id.

Can anybody help find out why the invalid id error happens?

16:00:57.26 (1446525074)|SYSTEM_METHOD_ENTRY|[722]|System.debug(ANY)
16:00:57.26 (1446530656)|USER_DEBUG|[722]|DEBUG|    ec.Concur_Report_Id__c is here 401328
16:00:57.26 (1446536314)|SYSTEM_METHOD_EXIT|[722]|System.debug(ANY)
16:00:57.26 (1446539625)|STATEMENT_EXECUTE|[723]
16:00:57.26 (1446546287)|HEAP_ALLOCATE|[723]|Bytes:41
16:00:57.26 (1446552175)|SYSTEM_METHOD_ENTRY|[723]|System.debug(ANY)
16:00:57.26 (1446555285)|USER_DEBUG|[723]|DEBUG|eCache.Concur_Report_Id__c is here 401328
16:00:57.26 (1446559344)|SYSTEM_METHOD_EXIT|[723]|System.debug(ANY)
16:00:57.26 (1446562165)|STATEMENT_EXECUTE|[724]
16:00:57.26 (1446583131)|SYSTEM_METHOD_ENTRY|[724]|String.valueOf(Object)
16:00:57.26 (1446589079)|HEAP_ALLOCATE|[724]|Bytes:18
16:00:57.26 (1446600036)|SYSTEM_METHOD_EXIT|[724]|String.valueOf(Object)
16:00:57.26 (1446604857)|HEAP_ALLOCATE|[724]|Bytes:51
16:00:57.26 (1446609913)|SYSTEM_METHOD_ENTRY|[724]|System.debug(ANY)
16:00:57.26 (1446613386)|USER_DEBUG|[724]|DEBUG|eCache.Expense_Report__c is here a1G6F000003VESYUA4
16:00:57.26 (1446618236)|SYSTEM_METHOD_EXIT|[724]|System.debug(ANY)
16:00:57.26 (1446768110)|HEAP_ALLOCATE|[725]|Bytes:16
16:00:57.26 (1446787793)|METHOD_EXIT|[397]|01p90000006RpI3|dldcExpenses.getExpenseReport(Expense_Cache__c)
16:00:57.26 (1446797257)|SYSTEM_MODE_EXIT|false
16:00:57.26 (1446804851)|METHOD_EXIT|[26]|01p90000006RpI3|dldcExpenses.Create(List<Expense_Cache__c>)
16:00:57.26 (1446883993)|FATAL_ERROR|System.StringException: Invalid id: 

Class.dldcExpenses.getExpenseReport: line 725, column 1
Class.dldcExpenses.Create: line 397, column 1
Trigger.dldcConcurExpenseUpload: line 26, column 1
16:00:57.26 (1446898598)|FATAL_ERROR|System.StringException: Invalid id: 

I tried hard and can't any reason Invalid Id error happens.

Can anybody help on this?