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
prashant1985prashant1985 

Insert in custom object

i have created custom object  "scheduletest__c"  when i going to insert into that object its give error

 

Compile Error: unexpected token: '=' at line

 

below is code

 

scheduletest__c asd = new scheduletest__c();
       asd.schedulename__c = 'aaaaaaa';
       insert asd;

 

Thanks

Prashant

Nazeer AhamedNazeer Ahamed

You are populating only one field which is custom field, any mandatory field is there?

prashant1985prashant1985
thanks for reply. i got the solution.
i need to write this code in function.