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
Paulo CastroPaulo Castro 

How to insert a new record after create a custom object?

Hi,

 

 I know this question sounds stupid, but after search about 2 hours for an answer (without success!) I decided to ask for help.

 

 Im developing a new app using Force.com. After create a new custom object I would like to populate it with a few new records. I don't want/need to create a new tab/page to insert new rows, since this object will not need it. For example, I have this custom object called UserGroup__c and it will have 10 records that will not be available to change/delete or anything by user, so it doesn't need an interface. I will use it just for reference in a option list.

 

 Since it appears that we can't insert records using SOQL, how could I insert a single record in this object? I thought that using Schema Explorer in Force.com IDE I could do it, but it is not possible.

 

 Thank you in advance.

 

 Best regards,

 

 PH

 

RavanRavan

Hi Try adding using Data Loader, however before doing so... do a check... did you deploy the object??

 

data loader can load data to the object.

 

 

Paulo CastroPaulo Castro

Hi Ravan,

 

 thank you for your support!

 I did what you suggested and it worked fine.

 

 Do you have a clue about why we can't do it using SOQL? Or maybe SF could buid a kind of object navigator where we could insert new records...

 

 Anyway, thank you again.

 

 Best regards

 

 PH