• Olivier Crivelli
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi there,
I've created a custom object (Event) and try to get data using QueryAsync .Net API. When I execute the query into the developper console, I got the right result with all the fields populated
SELECT ID, Name, ABI201504__Release__c, ABI201504__EventName__c, ABI201504__CityName__c, ABI201504__StartDate__c, ABI201504__EndDate__c FROM ABI201504__Event__c

In my C# code I do the same

            // Populate List of Event
            String EventQuery = String.Format("SELECT ID, Name, {0}, {1}, {2}, {3}, {4} FROM {5}",
                Utilities.getAPIFieldName("Release"),
                Utilities.getAPIFieldName("EventName"),
                Utilities.getAPIFieldName("CityName"),
                Utilities.getAPIFieldName("StartDate"),
                Utilities.getAPIFieldName("EndDate"),
                Utilities.getAPIFieldName("Event"));
            List<Event> eventList = new List<Event>();
            var results = await forceClient.QueryAsync<Event>(EventQuery);

In the "results" var I got the number of records I expected, but only the "ID" and "Name" field contain Data, the other fields (customs) are empty. Did I miss something? Any Idea?
Thanks in advance for your help
Olivier
Hi,
I'm beginner in SalesForce development. I'im trying to connect the Sample Application "SimpleConsole" to my SalesForce account, to try to understand how to connect a .NET app to SalesForce. For this:
  • I've created an application From SalesForce (name is ABITestOAuth)
  • I've got the the Consumer Key and Consumer Secret which I put in my .Net project
  • I've used my Username and password (SalesForce / Force.com devleoper account)
In my code I did the following (like in the sample)
var auth = new AuthenticationClient();
var url = IsSandboxUser.Equals("true", StringComparison.CurrentCultureIgnoreCase)
                ? "https://test.salesforce.com/services/oauth2/token"
                : "https://login.salesforce.com/services/oauth2/token";
 await auth.UsernamePasswordAsync(ConsumerKey, ConsumerSecret, Username, Password, url);

But no way to get a connection.
My question are:
Did I do something wrong until here, or did I miss some important steps?
I wanted to go back to my application in SalesForce to check the Consumer Key and Consumer Secret, but was not able to find this information again. Where can I access to this information after having created the application in SalesForce?

Any help would be welcome
Thanky in advance and best regards
Olivier
Hi there,
I've created a custom object (Event) and try to get data using QueryAsync .Net API. When I execute the query into the developper console, I got the right result with all the fields populated
SELECT ID, Name, ABI201504__Release__c, ABI201504__EventName__c, ABI201504__CityName__c, ABI201504__StartDate__c, ABI201504__EndDate__c FROM ABI201504__Event__c

In my C# code I do the same

            // Populate List of Event
            String EventQuery = String.Format("SELECT ID, Name, {0}, {1}, {2}, {3}, {4} FROM {5}",
                Utilities.getAPIFieldName("Release"),
                Utilities.getAPIFieldName("EventName"),
                Utilities.getAPIFieldName("CityName"),
                Utilities.getAPIFieldName("StartDate"),
                Utilities.getAPIFieldName("EndDate"),
                Utilities.getAPIFieldName("Event"));
            List<Event> eventList = new List<Event>();
            var results = await forceClient.QueryAsync<Event>(EventQuery);

In the "results" var I got the number of records I expected, but only the "ID" and "Name" field contain Data, the other fields (customs) are empty. Did I miss something? Any Idea?
Thanks in advance for your help
Olivier
Hi,
I'm beginner in SalesForce development. I'im trying to connect the Sample Application "SimpleConsole" to my SalesForce account, to try to understand how to connect a .NET app to SalesForce. For this:
  • I've created an application From SalesForce (name is ABITestOAuth)
  • I've got the the Consumer Key and Consumer Secret which I put in my .Net project
  • I've used my Username and password (SalesForce / Force.com devleoper account)
In my code I did the following (like in the sample)
var auth = new AuthenticationClient();
var url = IsSandboxUser.Equals("true", StringComparison.CurrentCultureIgnoreCase)
                ? "https://test.salesforce.com/services/oauth2/token"
                : "https://login.salesforce.com/services/oauth2/token";
 await auth.UsernamePasswordAsync(ConsumerKey, ConsumerSecret, Username, Password, url);

But no way to get a connection.
My question are:
Did I do something wrong until here, or did I miss some important steps?
I wanted to go back to my application in SalesForce to check the Consumer Key and Consumer Secret, but was not able to find this information again. Where can I access to this information after having created the application in SalesForce?

Any help would be welcome
Thanky in advance and best regards
Olivier