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
Jordan TorreyJordan Torrey 

Im getting an unexpected token: '='

This is driving me crazy. I've checked the API name, and tried toying with it in any possible way(I can think of) . Im a very new SF developer, so i would not be suprised if i made a novice mistake. If anyone can scrutinize this snippet of code and give me a hand, it would be much appreciated. Im just adding objects to a list, so i would imagine once i get this issue resolved, i can use the same method to fix the rest.
AEXP_Dynamic_Data_Capture__c objDDC = new AEXP_Dynamic_Data_Capture__c();	  
    
    objDDC.Display_When__c = '';
    objDDC.Element_Id__c = '49';
    objDDC.Element_Label__c = 'Legal Company Name';
    objDDC.Element_Type__c = 'Text';
    objDDC.Element_Value__c = 'Dreamforce';
    objDDC.Enrollement__c = 'a694B00000003wdQAA';
    objDDC.Field_Sort_Id__c = '1';
    objDDC.isRequired__c = 'True';
    objDDC.Max_Length__c = '100';
    objDDC.Section_Name__c = 'Legal Company Information';
    objDDC.Section_Sort_Id__c = '';
    
   
        lstobjDDC.add(objDDC);
Temoc MunozTemoc Munoz
Could you provide the rest of the code?

Are all fileds of type string?? If not, make sure you are assigning the correct values (i.e. true instead of 'true', etc.)
sandhya reddy 10sandhya reddy 10
Try giving values according to data type of the feild .If the values are put in quotes it is considered as string.