How to expose an apex class as a rest webservice in salesforce?
Answer / Nivedita Valecha
To expose an Apex class as a REST Web Service in Salesforce, you can use the @RestResource annotation. Here's a simple example:nn```javan@RestResource(urlMapping='/myClass/*')nglobal with sharing class MyClass {n @HttpGetn global static List<Account> getMyData() {n // Your logic to retrieve data here.n }n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
How to handle comma within a field while uploading using data loader? : salesforce crm
What is the difference between detail page and edit page?
How do I create a manual sharing rule in Salesforce?
What is workflow? : salesforce admin
How you will add an attachment from VF page? tell me the component names to achieve this functionality?
What are the different ways to Share a record?
Is there is any option to specify time zone for uploading records in apex data loader? : salesforce Data Management
Define sosl ?
How many relationships are present in Salesforce?
What are methods in rest? : salesforce integration
What is sfdc in salesforce?
What are external Ids? Does external ids are unique in salesforce? : salesforce objects & fields