You need to sign in to do that
Don't have an account?
OyeCode
Syntax Error
Can anyone plese advice what wrong in here
Map<Id, List<ContactRoleCount__c>> contactRoleMap = new Map<Id, List<ContactRoleCount__c>>(); List<ContactRoleCount__c> contactRolesList = new List<ContactRoleCount__c> ([SELECT ContactRoleCount__c from Opportunity where OpportunityId in : trigger.newmap.keyset() order by opportunityid]); // Iterate and poopulate the Map for(ContactRoleCount__c crc: contactRoleMap) { //populate the list by fetching value from the map List<ContactRoles__c> cr = contactRoleMap.get(crc.ContactRole__c); if (cr == null) { cr = new List<Service_Request__c>(); contactRoleMap.put(crc.ContactRole__c, cr); } cr.add(crc); // add to the list }
Error code
Error: Compile Error: No such column 'opportunityid' on entity 'Opportunity'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name |
Using "Opportunity" as the base entity, it should just be "Id", not "opportunityid".
All Answers
Using "Opportunity" as the base entity, it should just be "Id", not "opportunityid".
Thanks, I just figured this out :smileyhappy: