Skip to main content

Posts

Showing posts from February, 2016

Angular JS with Salesforce Remote Actions

Using Angular JS with Remote Actions Nowadays Angular JS is a great front end framework to bind DOM objects easily and do many more things in the DOM. Here I'm going to describe how to use Angular with visual force and apex remote actions. So we can add angular code in the visual force page itself or we can add angular code to the static resource. As per the my understanding , If we use angular code in the visual force page itself it will break the single page application concept. Because when rendering a new visual force page we have to create one angular application for each visual force page. So in this post I'm going to use static resource to write angular code. And also I'm going to use welkin suite for as the IDE. Because from welkin suite we can modify the static resource bundle (But currently we cannot add js files for partial pages to static resource , only thing what we can do is modify the bundle , but it is great because we can compare the modifications what

Salesforce REST API III

After receiving the access token we will be able make requests and get data from salesforce via the rest api. When we making a request we need  to add Authorization header in each and every request that including the access token. If the access token is missing , invalid or expired we will get 401 Unauthorized error.Header value should be like below.There should be a space between OAuth and access token.                       Authorization  OAuth  access_token. Salesforce rest api has a service ( one of my favorite service ) to make queries through the request. So we will make a select query get all the accounts in salesforce. Sample service :   https://login.salesforce.com/services/data/v34.0/query?q='you query goes to here' Now I'm going to get all accounts in salesforce by using 'SELECT Id , Name FROM Account LIMIT 10' query. Here getting only 10 records because of the salesforce governor limit. therefore I need to send  below get request with the Au