function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mani Kandan01Mani Kandan01 

how to get inputvalue using trigger.newmap

Hai all

i use this code to get the input value 
Date startDate1 = Trigger.newMap.get(product.OpportunityId).startDate__c;

it display the below error
Method does not exist or incorrect signature: void get(Date) from the type Map<Id,SObject>

but when using this it returns corresponding id.
String startDate1 = Trigger.newMap.get(product.OpportunityId).Id;

thanks in advance.
 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Mani,

Can you set debug logs and see if there is any field value being returned for startDate__c and if so can you check if you are able to get the date after getting the record into an sobject variable and applying .startDate__c

Thanks.