+ Start a Discussion
Anu Raj.ax1269Anu Raj.ax1269 

Map error

Hi

I have created a

Map<id, id> MapEvApp = new Map<id, id>();

i added event id and event.appointment id into map

 

Now i am using the Map as 

MapEvAppId.get(appointup_eventid[i].id).id) ;

Where appointid_event is alist of oppintment which contains field when app id = id in set;

 

But when i use the map to get  event id before saving i am getting this error

Error: Compile Error: Initial term of field expression must be a concrete SObject: Id at line 127 column 110

 

Thanks

Anuraj

 

Best Answer chosen by Admin (Salesforce Developers) 
vishal@forcevishal@force

I think you need to change this:

 

MapEvAppId.get(appointup_eventid[i].id).id) ; should be MapEvAppId.get(appointup_eventid[i].id));

All Answers

sfcksfck

are you sure appointup_eventid is a list of objects, not a list of ids?

 

If that doesn't help please post your code and indicate which line is the one with the error

 

Thanks

vishal@forcevishal@force

I think you need to change this:

 

MapEvAppId.get(appointup_eventid[i].id).id) ; should be MapEvAppId.get(appointup_eventid[i].id));

This was selected as the best answer