Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to expose an apex class as a rest webservice in salesforce?



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

Post New Answer

More Salesforce Interview Questions

How to handle comma within a field while uploading using data loader? : salesforce crm

1 Answers  


What is the difference between detail page and edit page?

1 Answers  


How do I create a manual sharing rule in Salesforce?

1 Answers  


What is workflow? : salesforce admin

1 Answers  


How you will add an attachment from VF page? tell me the component names to achieve this functionality?

1 Answers   Cap Gemini,


What are the different ways to Share a record?

1 Answers   Cognizant,


Is there is any option to specify time zone for uploading records in apex data loader? : salesforce Data Management

1 Answers  


Define sosl ?

1 Answers  


How many relationships are present in Salesforce?

1 Answers  


What are methods in rest? : salesforce integration

1 Answers  


What is sfdc in salesforce?

1 Answers  


What are external Ids? Does external ids are unique in salesforce? : salesforce objects & fields

1 Answers  


Categories