AuthorNiranjan Chakankar

Using @future method in salesforce


Using @future method in salesforce and its limitations Salesforce provides different ways to run your code asynchronously like Batch apex, @future method. In this post we will see how to use @future method, its advantages, limitations and the precautions that we need to follow while using it. We can use the @future methods in cases where methods are long running. In such cases we can prevent...

Rest API Call for GET and POST


@RestResource(urlMapping=’/Account/*’) global with sharing class MyRestResource { @HttpGet global static Account doGet() { RestRequest req = RestContext.request; RestResponse res = RestContext.response; String accountId = req.requestURI.substring(req.requestURI.lastIndexOf(‘/’)+1); Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];...