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

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 9
    Questions
  • 10
    Replies
Is it possible to use the bulk api using access token instead of supplying the username and password in the Http Get or Post?

 
Hello, 

I have ran into what seems to be a SOQL issue in either: query syntax or I've discovered a bug. I state that this might be a either a query syntax issue or a bug based on the premise that I've searched for clues and I've found nothing. 

Anyways, I have created a custom view. This custom view is titled "Leads Test Cadinal". In this, I have added only 1 contact. I've populated the company field with "Cadinal Inc". 

Now what I'm trying to do is fetch that contact with the company name "Cadinal Inc" (for that particular view obviously). When I execute the SOQL I get no hits returned from Salesforce despite the contact existing in the list. 

Now onto the more techincal details: 

I invoke the describe query in order to find the query that I want to execute to get that particular contact out. This is the query I receive after invoking the describe call
"SELECT Name, Company, State, Email, toLabel(Status), CreatedDate, Owner.Alias, IsUnreadByOwner, Id, LastModifiedDate, SystemModstamp, Owner.Id, OwnerId FROM Lead WHERE IsConverted = false AND Company like '%Cadinal%' ORDER BY Name ASC NULLS FIRST, Id ASC NULLS FIRST"
When I receive the query from the describe call, the query that I will use to fetch the contact in the list is the following: 
"/services/data/v38.0/query?q=SELECT id , email, Company FROM Lead WHERE IsConverted = false AND Company like '%Cadinal%' ORDER BY Name ASC NULLS FIRST, Id ASC NULLS FIRST"
Now what I am confused in is why the query fails to fetch the record? My hypothesis is that Salesforce keeps 
%Ca%
As a reserved word. I do not know why this query fails, can someone point me in the right direction on how to correctly query this. 

The following is a screen shot of my sample lead: 
Cadinal sample lead
Thanks, looking forward to some responses. 
Is there a way to convert a Lead to Opportunity or Account using a REST API call ?
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
How to create a feed item using the Chatter Rest API. I have looked at the documentation as well https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickreference_post_feed_item.htm

I keep getting error of resource not found.

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

How is this possible ?

User-added image
Is it possible to create a Custom Object using Rest API?

I am aware that is possible to insert , update and delete to a custom object 

 
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 
I am creating an application using ASP.NET MVC to collaborate with salesforce api. I have it working on my developer account. How can I allow this application I made to be used by normal users

Please advice the steps as I am new to salesforce
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
  • February 23, 2016
  • Like
  • 0

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);

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