+ Start a Discussion
ZoomVZoomV 

Expression cannot be assigned error

Chamil MadusankaChamil Madusanka

Noramally this error can be occured for following scenario. But I couldn't find such scenario in you code. Please check you r code with following scenario.

 

IF (MDF__c.Submitted__c = true)

this should be

IF (a.Submitted__c == true)

 Hit the Kudos button if any post helps you - Mark the answer as solution, It might help others running to into similar problem in future.

Shailesh DeshpandeShailesh Deshpande
Try changing this:

Detail_object__c.sub_detail__c = keyTechsolutions;

TO

Detail_object__c objdetailobject = New Detail_object__c();
objdetailobject.sub_detail__c = keyTechsolutions;
davidjgriffdavidjgriff

Where are you instantiating currentportfolioId? You are using in your first query, but as far as the query is concerned, it doesn't really exist yet...