• MikeWires
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
I've been working with the SF API for awhile now, and have a quirky problem. I've noticed this several times, when I executing a piece of code similar to the following query / PHP....

      $query = "Select Assistant_Commission_Percent__c, Assistant_Name__c, CreatedById, CreatedDate, Id, LastModifiedById, LastModifiedDate, Name, OwnerId, Strategist_Commission_Percent__c, Strategist_Name__c,  SystemModstamp from User_Commission__c where UserId__c ='". $_POST['OwnerId'] ."'";
      $result = $sforce->query(array("queryString" => $query));
     if(isset($debug)){
      echo "User Commission Object<br>";
      echo $query;
      echo "<pre>";
      print_r($result);
      echo "</pre>";
      }
 
I get the following return...

User Commission Object
Select Assistant_Commission_Percent__c, Assistant_Name__c, CreatedById, CreatedDate, Id, LastModifiedById, LastModifiedDate, Name, OwnerId, Strategist_Commission_Percent__c, Strategist_Name__c, SystemModstamp from User_Commission__c where UserId__c ='00530000000uXmoAAE'
stdClass Object
(
[result] => stdClass Object
(
[done] => 1
[queryLocator] =>
[records] => stdClass Object
(
[Id] => a0B50000000JYp3EAG
)
[size] => 1
)
)
The query syntax is correct, even the result (Id) is correct, but I ONLY get the Id of the object I'm looking at returned. I am using the enterprise WDSL, and it is updated. In the past, its seems that leaving the code alone for a day fixes the problem, and 'magically' 24 hours later the same code returns all the fields I requested. (Yes, I might be losing my mind with a statement like that.)

Any ideas what is causing this and/or has anyone experienced a similar problem?

I added the Sales Quote with Product Line Items (clean install) to my Salesforce instance, and decided to give the Print Anything module a try to get a more presentable format for sending quotes to potential customers.

I followed the instructions in the Excel spreadsheet; creating the package, queries, and the English template.

I then created the custom link and added it to the Quote layout.  When I attempt to run the Print Anything report, I get the following error:

Error : INVALID_TYPE: Didn't understand relationship 'Quote__r' 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.



I'm extremely new to developing in Salesforce, so I'm not even sure where to go looking.  The failure is happening in the "Quote and Line Item" query that is first in the sequence. 

The actual query is:

Select
    s.Id, s.Name,
    s.Opportunity__c,
    s.Presented_Date__c,
    s.Quote_Amount__c,
    s.Valid_Until__c,
    (
        Select
            Ext_Net_Price__c,
            Ext_Price__c,
            Product2__c,
            Qty_Ordered__c,
            Sales_Discount__c,
            Unit_Net_Price__c,
            Unit_Price__c
        From
            Quote__r
    )

from
    SFDC_520_Quote__c s
where
    Id = '{Parameter.quoteId}'
Hello.  I'm having an issue when I Override the New button a custom object.  I'm unable to get a value from the merge field or a specific object type.

I want to Override the New button for custom object X.  X has a master/detail relationship to Account, and a lookup relationship to Y.  I want to be able to go to the detail screen of a Y record, click New on the X related list, and I want to be able to access the Id of Y. 

However I don't seem to be able to get Y.Id.  I can get the Account Id (if I am on the Account detail page).  Is this because Y is a Lookup relationship and not a Master/Detail relationship?  Do I have to do this as a standard scontrol instead of as a New Button override?

Thanks for your time.
Chris


  • April 12, 2007
  • Like
  • 0
Hi,
 
I am trying to get the hour of the 'Date/Time Opened' field within Cases.  Ideally I'd like to be able to pull something like 4:00 PM or 20:00, or something along these lines.
 
Anybody know a way to do this with a formula?
 
Thanks!!

Message Edited by JWOODY on 10-18-2006 09:25 PM

  • October 19, 2006
  • Like
  • 0
I've been working with the SF API for awhile now, and have a quirky problem. I've noticed this several times, when I executing a piece of code similar to the following query / PHP....

      $query = "Select Assistant_Commission_Percent__c, Assistant_Name__c, CreatedById, CreatedDate, Id, LastModifiedById, LastModifiedDate, Name, OwnerId, Strategist_Commission_Percent__c, Strategist_Name__c,  SystemModstamp from User_Commission__c where UserId__c ='". $_POST['OwnerId'] ."'";
      $result = $sforce->query(array("queryString" => $query));
     if(isset($debug)){
      echo "User Commission Object<br>";
      echo $query;
      echo "<pre>";
      print_r($result);
      echo "</pre>";
      }
 
I get the following return...

User Commission Object
Select Assistant_Commission_Percent__c, Assistant_Name__c, CreatedById, CreatedDate, Id, LastModifiedById, LastModifiedDate, Name, OwnerId, Strategist_Commission_Percent__c, Strategist_Name__c, SystemModstamp from User_Commission__c where UserId__c ='00530000000uXmoAAE'
stdClass Object
(
[result] => stdClass Object
(
[done] => 1
[queryLocator] =>
[records] => stdClass Object
(
[Id] => a0B50000000JYp3EAG
)
[size] => 1
)
)
The query syntax is correct, even the result (Id) is correct, but I ONLY get the Id of the object I'm looking at returned. I am using the enterprise WDSL, and it is updated. In the past, its seems that leaving the code alone for a day fixes the problem, and 'magically' 24 hours later the same code returns all the fields I requested. (Yes, I might be losing my mind with a statement like that.)

Any ideas what is causing this and/or has anyone experienced a similar problem?