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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What were you doing before sfdc development?

498


What is workflow rule and workflow actions? : salesforce workflows and approval process

544