Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
ApprenticeObj.Programme_Area__c = ProgramArea.Id; ApprenticeObj.Date_of_Birth__c = date.parse('12/08/2000'); // use any date you like
public PageReference save(){ if(ApprenticeObj != null){ upsert ApprenticeObj; } return null; }
All Answers
This error is due to save method in the class, at the time updating of apprentice object we need record id.
apprenticeobj.id = 'recordid';
update apprenticeobj;
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
to upsert apprenticeobj;
You can change your save method as below
Thanks
Preyanka