-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
5Questions
-
3Replies
Quarter and months don't match up.
I ran the same query with three different times specified and got three different results. I ran the query once using "LAST_QUARTER", once using the dates describing that quarter, then three times using the dates which describe those months. Different answers!
Q1 08
"SELECT Severity__c, S__c, Owner.Name, IsClosed, CreatedDate FROM Case WHERE CreatedDate > 2008-01-01T00:00:01Z AND CreatedDate < 2008-03-31T23:59:59Z"
RESULT: 2012
MONTHS IN Q1 QUERIED INDIVIDUALLY
January
"SELECT Severity__c, S__c, Owner.Name, IsClosed, CreatedDate FROM Case WHERE CreatedDate > 2008-01-01T00:00:01Z AND CreatedDate < 2008-01-31T23:59:59Z"
RESULT: 663
February
"SELECT Severity__c, S__c, Owner.Name, IsClosed, CreatedDate FROM Case WHERE CreatedDate > 2008-02-01T00:00:01Z AND CreatedDate < 2008-02-28T23:59:59Z"
RESULT: 632
March
"SELECT Severity__c, S__c, Owner.Name, IsClosed, CreatedDate FROM Case WHERE CreatedDate > 2008-03-01T00:00:01Z AND CreatedDate < 2008-03-31T23:59:59Z"
RESULT: 692
TOTAL RESULT: 1987
A difference of 25!
How is this possible? What am I doing wrong? I need some help on this.
-
- sissyphus
- September 04, 2008
- Like
- 0
- Continue reading or reply
Date inconsistencies
SELECT Loss_Date__c, Sales_Region__c, StageName, Amount FROM Opportunity WHERE StageName ='LOST' AND IsWon =FALSE AND Loss_Date__c > 2008-01-01 AND Loss_Date__c < 2008-01-31 ORDER BY Loss_Date__c
This query returns 381 records
When I run a similar query for the first three individual months of 08 using their respective boundary dates I get back 195, 97, and 66 records respectively which add up to 358 and makes no sense.
'Jan-08' => array('2008-01-01', '2008-01-31'),
'Feb-08' => array('2008-02-01', '2008-02-28'),
'Mar-08' => array('2008-03-01', '2008-03-31'),
Can you tell me why sales force is returning such different results?
-
- sissyphus
- September 03, 2008
- Like
- 0
- Continue reading or reply
What day does a week start on?
-
- sissyphus
- August 20, 2008
- Like
- 0
- Continue reading or reply
When does a week start?
-
- sissyphus
- August 20, 2008
- Like
- 1
- Continue reading or reply
Date Help : Yesterday, Last Quarter, etc.
-
- sissyphus
- August 11, 2008
- Like
- 0
- Continue reading or reply
When does a week start?
-
- sissyphus
- August 20, 2008
- Like
- 1
- Continue reading or reply
Cannot retrieve AccountID or AccountName when Querying on Cases
PHP toolkit-11_0b
PHP 5.1.6
Salesforce API version 11
I am trying to retrieve the Account name or id, when querying on Cases from the API, but I could not find a way to do that:
SELECT Id, Account.Name FROM Case --> Doe not work with PHP
SELECT Id, AccountId FROM Case --> No such column 'AccountId' on entity 'Case'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
SELECT Name, (SELECT Id FROM Cases WHERE Id = '".$MyCase->Id."') FROM Account --> Didn't understand relationship 'Cases' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Someone can help me on that?
Thanks a lot,
Etienne
- EtienneCoutant
- February 26, 2008
- Like
- 0
- Continue reading or reply
PHP Toolkit v11
Newly supported or enhanced in this release are:
* Metadata API
* Email
* Merge
* Workflow
* EmptyRecycleBin
* Proxy Server
* LoginScopeHeader
* Header Options at the Connection Level
Click this link to enjoy. Be sure to check out the extensive Samples section as well.
- Tran Man
- February 08, 2008
- Like
- 1
- Continue reading or reply
Access RelationShip Query results
$strSQL .= "CaseNumber,Subject,Status,CreatedDate,What_is_your_acronym__c,Which_product__c ";
$strSQL .= "FROM Case ORDER BY Id DESC LIMIT 2 ";
$Result = $mySforceConnection->query($strSQL);
if ($Result->size == 0) {
NoRecords(0);
}else{
$records = $Result->records;
foreach ($records as $record) {
$sObject = new SObject($record);
echo $sObject->fields->CaseNumber.":: ";
echo $sObject->fields->Contact->FirstName."<br>";
echo $sObject->fields->FirstName;
}
}
- Jim Anderson
- June 14, 2007
- Like
- 0
- Continue reading or reply