You need to sign in to do that
Don't have an account?
Divya Mall
how to create a custom object like Employee and insert value into it using apex rest api
how to create a custom object like Employee and insert value into it using apex rest api
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
1. Creating custom object Employee ( You can able to do it by using STandard Setup or by using metadata )
2 . Data load
You can able to load the data by using rest resource
curl https://yourInstance.salesforce.com/services/data/v20.0/sobjects/<Cutsom_Obj__C>/ -H "Authorization: Bearer token -H "Content-Type: application/json" -d "@newaccount.json"
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm
You can create the Custom object record using Rest API via Workbench.
For workbench:
URL: /services/data/v42.0/sobjects/Employee__c
Method: POST
Body:Here assign the field values for all the required fields on that object. For example, say Name is the only required Field on that custom object then your body will look like
{
"Name":"Workbench Record"
}
Likewise you can map other field values.
Let me know if it helps.
Thanks
Q. What do you mean by apex rest? A custom rest api existting in the org or the Standard rest api of salesforce.
Q. From where are you trying to access the Rest API? From within the org(using Apex), or from workbench or from a 3rd party tool?
2. In my project there are seperate Dot Net development team and they want to use salesforce so that we need to create the APEX REST API
I am assuming that you have a decent knowledge about Apex.
Your custom rest api will look like this:
I would suggest using the standard Rest Api provided by salesforce unless you want some customized functionality.
Refer this link: https://developer.salesforce.com/page/Creating_REST_APIs_using_Apex_REST