• Bushra Salman 6
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi Friends

How can i share my Post HTTP Request to external system in term of javascript.I have checked in postman and its create token and record ,but its not working when i will change same in javascripts format.So how to create access token in first hit and push record in second hit just like postman .


 
var clientId = 'myconsumerkey';
var clientSecret = 'mysecretkey';

var authorizationBasic = $.base64.btoa(clientId + ':' + clientSecret);

var request = new XMLHttpRequest();
request.open('POST', oAuth.AuthorizationServer, true);
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
request.setEndpoint('https://cs72.salesforce.com/services/oauth2/token');
request.setRequestHeader('Authorization', 'Basic ' + authorizationBasic);
request.setRequestHeader('Accept', 'application/json');
request.send("username=admin&password=test&grant_type=password");

request.onreadystatechange = function () {
    if (request.readyState === 4) {
       alert(request.responseText);
    }
};

 
I have configure SharePoint Online successfully as my external document management and file storage system using the standard Files Connect adapter.

Now I want to attach a file that is stored in SharePoint to a Salesforce Record, in APEX code. However I was not able to figure out how this might be possible. Anyone succeeded in doing this? I would also go for creating a Chatter post in APEX, but the FilesCapabilities do only support linkage to existing ContentDocument record, but my SharePoint files are not (yet) listet there.
Hi,
Here i need to pass values from One VF page to another VF page.
In one vf page i have selected some records or values and then i want to pass those values to another page.
So please help me..
Thanks in Advance.
Anji