Like custom objects , custom settings also have name as required field by default which can later be used to get data as key value pair Hence It is important to provide name to custom setting while creating a record . Following code should work for you if you have no other required field other than name .
Like custom objects , custom settings also have name as required field by default which can later be used to get data as key value pair Hence It is important to provide name to custom setting while creating a record . Following code should work for you if you have no other required field other than name .
Like custom objects , custom settings also have name as required field by default which can later be used to get data as key value pair Hence It is
important to provide name to custom setting while creating a record .
Following code should work for you if you have no other required field other than name .
Please mark it best answer if it solves.
All Answers
thanks for replying , but i have error
this is my code for insert the record on keys__c field
API_KEY__c ak=new API_KEY__c(keys__c = 'Test');
insert ak;
Line: 3, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Name]: [Name]
Please provide a name when you are inserting API_KEY__c.
Please mark it as Best Answer if it helps you.
Thanks & Regards
Suraj Tripathi
Like custom objects , custom settings also have name as required field by default which can later be used to get data as key value pair Hence It is
important to provide name to custom setting while creating a record .
Following code should work for you if you have no other required field other than name .
Please mark it best answer if it solves.
Thanks & Regards
Aditya Narwade