• theDreamer
  • NEWBIE
  • 20 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 1
    Replies
<form action="action_page.php">
  First name:<br>
  <input type="text" value="Mickey"><br>
  Last name:<br>
  <input type="text" name="lastname" value="Mouse"><br><br>
  <input type="submit" value="Submit">
</form>
I have a website with an HTML form with 2 fields on a website (example: www.abc.com/test.htm), how do i submit this data to a contact object in salesforce. It should not throw error if the record already exists in contact(salesforce).

What is the standard way to do it?

 
In order to manage Collabration of Files, I am really confused about whether to use google drive or dropbox or anything else with salesforce.

My needs are admin will upload documents, word document or spreadsheet in the salesforce system.

The document has to be shared with all users.

Simultaneously all the users should be able to edit the document similar to how google drive does it

So my Questions are:
1. Is this facility of Collaboration of files available in salesforce (inbuilt).
2. If not is there any free app where admin can upload files on google drive and same will be shared on salesforce
3. Does that admin have to login always on google drive to upload files and share?
4. Dropbox or google drive can be used for simultaneously editing the files?

 
Which license should I use (force.com  or salesforce.com) if I want to develop a complex application with many reports?
I am calling a REST Api which needs oAuthkey and Password. Here is my Class
 
public with sharing class DetailButtonController
{
  public string responseText {get;set;}

  public DetailButtonController() {
     responseText = '';
  } 

   public void doSomething() {

    String oauthkey='asdasdasd asd77cf6ef73b77';
    String oauthsecret='asdasdasdasd2195385b9aa2';
    String action='get';

    Http m_http = new Http();
    HttpRequest req = new HttpRequest();

    String content = 'action='+EncodingUtil.urlEncode(action, 'UTF-8')+'&oauth_consumer_key='+EncodingUtil.urlEncode(oauthkey, 'UTF-8')+'&oauth_consumer_secret='+EncodingUtil.urlEncode('oauthsecret', 'UTF-8');

    req.setEndpoint('http://www.abc.com/api/1.0/accounts/2323.xml/');
    req.setHeader('Content-Type','application/x-www-form-urlencoded');        
    req.setMethod('POST');
    req.setBody(content);

    httpResponse response = m_http.send(req);

    responseText = response.getBody();
  }

}

Apex Code
<apex:page controller="DetailButtonController">
    <b>Hello World!</b>
    <apex:form >
        <apex:commandButton value="Do something" action="{!doSomething}"/>
        <apex:outputPanel layout="block">
          {!responseText}
        </apex:outputPanel>
    </apex:form>
</apex:page>

The error i am getting is as below, Does that mean there is some other method to call Rest API using oauth?
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response success="false" xmlns="http://www.abc.com"><error http-status="401">oauth consumer key and/or signature not included in request parameters or authorization header</error></response>


I have Visual force page from where i want to click on a button

That button will call a 3rd Party REST API and will pass parameter to it including account name, oauth consumer key and consumer secret.

I want to do reverse of this https://developer.salesforce.com/page/Using_OAuth_to_Authorize_External_Applications

Any help urls would be appreciated

I am a PHP Developer and new to Salesforce. I have been given quite cumbersome task of connection to a 3rd Party REST API using oAuth.

I got the consumer key, secret and the account number of the API. 

  1. appDescription
  2. accountID
  3. oauth_consumer_key
  4. oauth_consumer_secret 

I have learned how to create Visual force page, what i want a code/library which checkes if all the login deetails using 4 listed above are valid or not, if not show an error.

Please help.

I am calling a REST Api which needs oAuthkey and Password. Here is my Class
 
public with sharing class DetailButtonController
{
  public string responseText {get;set;}

  public DetailButtonController() {
     responseText = '';
  } 

   public void doSomething() {

    String oauthkey='asdasdasd asd77cf6ef73b77';
    String oauthsecret='asdasdasdasd2195385b9aa2';
    String action='get';

    Http m_http = new Http();
    HttpRequest req = new HttpRequest();

    String content = 'action='+EncodingUtil.urlEncode(action, 'UTF-8')+'&oauth_consumer_key='+EncodingUtil.urlEncode(oauthkey, 'UTF-8')+'&oauth_consumer_secret='+EncodingUtil.urlEncode('oauthsecret', 'UTF-8');

    req.setEndpoint('http://www.abc.com/api/1.0/accounts/2323.xml/');
    req.setHeader('Content-Type','application/x-www-form-urlencoded');        
    req.setMethod('POST');
    req.setBody(content);

    httpResponse response = m_http.send(req);

    responseText = response.getBody();
  }

}

Apex Code
<apex:page controller="DetailButtonController">
    <b>Hello World!</b>
    <apex:form >
        <apex:commandButton value="Do something" action="{!doSomething}"/>
        <apex:outputPanel layout="block">
          {!responseText}
        </apex:outputPanel>
    </apex:form>
</apex:page>

The error i am getting is as below, Does that mean there is some other method to call Rest API using oauth?
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response success="false" xmlns="http://www.abc.com"><error http-status="401">oauth consumer key and/or signature not included in request parameters or authorization header</error></response>