• Alvin Dutt 6
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 9
    Questions
  • 10
    Replies
I am using REST API to get data of all contacts in my salesforce. When retrieving the object, there is 2 json values for Account ID (Account Id and Account.Id) which one should be used and why is there 2?

User-added image
I am trying to add feeds to this section when an Activity is added to a Contact 

How is this possible ?

User-added image
I have created a custom object, My question is how can I show that custom object in the Leads Page

for example I would want to show the custom object in that block highlighted with red along with the Activity History

I am new to Salesforce 
User-added image
Later I will add to data to the custom object using my own API 
The Activity History related list can show four types of items - Event, Email, Call, Task. In the database schema the Event, Call and Task objects are all lumped together so to speak and classified as Activities. The EmailMessage object, where outgoing emails live, is the adopted child as far as Activity History goes.

If you want a custom field column to show in the Activity History related list, you add a field to Activity Custom Fields. The system then automatically associates that custom field with a Call, Task or Event, but not with an EmailMessage. The EmailMessage object, being disconnect from the other activity types, has it's own custom fields. So you can add a custom field to the EmailMessage object, unfortunately there's no way to display it, as far as I can tell, in the activity history related list.

For example, I want a custom field named Consultant to be displayed for calls, tasks, events as well as email messages. I added a Consultant field to Activity Custom Fields as well as the EmailMessage object. As you can see, unfortunately the Activy History related list is only smart enough to show the Consultant Custom field for activity type items and not email messages. Is there a workaround or some other way to make this happen perhaps?
User-added image
Is there a way to create Open Activities under Contact through rest api?
Hello,

In the contact page layput i have below related lists.
User-added image

I have duplicated the contact object and called it customX, I have created a lookup on activites, because of which i get a related list on my customX with name "Activities", 

I am wonderting how can i add the other related lists, like
Open activities,
activities history

thank you for suggestiion

How to create a new Custom Object using REST API services????

 

 

I am using this url : https://ap1.salesforce.com/services/data/v28.0/sobjects/CustomName

 

n data input as  

 

{

    "Name" : " CustomName"

}

 

then it gives me error as : 

     [
       {
                "message": "The requested resource does not exist",
                "errorCode": "NOT_FOUND"
       }
    ]

 

I am able to do all kind of stuffs like creating new record, updating deleting records in an existing CUSTOM OBJECT..........creating Triggers, Classes for it but not able to create a NEW Custom Object............!!!!

 

 

Please Help....!!

 

Thanks in advance....!!!

Pooja 

Hello

 

I'm working on an app in java (Android) and I'm trying to use a refresh token to obtain a new OAuth access token.  I got the access token through the SalesForce Android toolkit, and this logs me in fine for the session, but when I use the refresh token to try to get a new access token, I get the following error:

 

{"error":"invalid_grant","error_description":"expired access/refresh token"}

 

My consumer key and secret both seem to be fine, because I get the appropriate errors when I alter them.  Has anyone else been getting this error?  Is it something to do with the URL encoding?

 

Here is the code I'm using:

 

      HttpPost httppost = new HttpPost(
          "https://login.salesforce.com/services/oauth2/token");

      List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
      nameValuePairs.add(new BasicNameValuePair("grant_type", "refresh_token"));
      nameValuePairs
          .add(new BasicNameValuePair("client_id", OAUTH_CONSUMER_KEY));
      nameValuePairs.add(new BasicNameValuePair("client_secret",
          OAUTH_CONSUMER_SECRET));
      nameValuePairs
          .add(new BasicNameValuePair("refresh_token", REFRESH_TOKEN));
      nameValuePairs.add(new BasicNameValuePair("format", "json"));

      httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

      HttpClient client = new DefaultHttpClient();
      HttpResponse response = client.execute(httppost);
      HttpEntity entity = response.getEntity();

      String responseText = EntityUtils.toString(entity);