• g-man
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hi again,

I'm trying to use a query to determine if any new Accounts where created over a certain date range. I keep getting a "MALFORMED QUERY" exception for my datetime value. Looking at the API docs, it says I need to use the date format "2005-10-24" or "2005-10-24T12:11:00" (which is what I'm using).

I think the problem is when I pass the DateTime object into the query string, the API calls ToString() on it and ToString() always formats the date to "10/24/2005" which causes the exception.

I'm using .NET C# environment.

Here's a code snippet:

DateTime startDate = DateTime.ParseExact("2005-10-24T00:00:00", "s", cultureInfo);
QueryResult result = _sforceService.query("select FirstName, LastName, CreatedDate from Contact where CreatedDate >= " + startDate);

Thanks!
  • October 24, 2005
  • Like
  • 0
Hi,

I want the ability to update separate application databases from within salesforce.com i.e. after updating User profile info, update separate app databases with new data. This would also need to work both ways i.e. changes to separate app databases would automatically update salesforce db.

Is this possible using the sforce API? If so, how is the API called from salesforce.com? My ideal is to create a .NET component which would make the calls to the sforce web service. The separate apps and salesforce would then make calls to my .NET component.

I'm new to the salesforce world so I'm not familiar with the framework of the app itself.

Language: .NET C#

Thanks,
Greg
  • October 19, 2005
  • Like
  • 0
When using the search() method, I get a record back representing my search but the field values are all empty or null. What am I missing here? Here is a code snippet:

SearchResult search = _sforceService.search(
"find {Greg} in NAME fields returning User");
SearchRecord[] records = search.searchRecords;

for (int i = 0; i < records.Length; i++)
{
sObject record = records[i].record;

if (record.GetType() == typeof(User))
{
User u = (User)record;
queryResults.Items.Add("User : " + u.FirstName + " " + u.LastName + " | " + u.Email);
}
}

It returns one User object but all fields are null. Any ideas? I've used the query() method without any problems.

Thanks!
  • October 14, 2005
  • Like
  • 0
Hi,

I want the ability to update separate application databases from within salesforce.com i.e. after updating User profile info, update separate app databases with new data. This would also need to work both ways i.e. changes to separate app databases would automatically update salesforce db.

Is this possible using the sforce API? If so, how is the API called from salesforce.com? My ideal is to create a .NET component which would make the calls to the sforce web service. The separate apps and salesforce would then make calls to my .NET component.

I'm new to the salesforce world so I'm not familiar with the framework of the app itself.

Language: .NET C#

Thanks,
Greg
  • October 19, 2005
  • Like
  • 0