+ Reply to Thread
Results 1 to 5 of 5

Thread: Returning a Formula result from in a SOQL SELECT statement

  1. #1
    Percy is offline Junior Member
    Join Date
    Aug 2008
    Posts
    3

    Question Returning a Formula result from in a SOQL SELECT statement

    Hello all,

    I am new to this forum and relatively new to SalesForce. I have been working on some concepts for a SalesForce application/integration with PHP. I started out by creating several new objects in SalesForce. Following that, I started on the PHP side to integrate with it. One of these objects has a Formula field that uses other fields from the object to generate a descriptive label. However, when I query the object (and the Formula field), the formula field is not returned.

    SELECT Id, OwnerId, Name, CreatedDate, CreatedById, FormulaField__c FROM MyObject__c

    What I get back:
    [Id] => a0370000004wjwXAAQ
    [CreatedById] => 00570000001441kAAA
    [CreatedDate] => 2008-06-23T21:32:02.000Z
    [Name] => Name
    [OwnerId] => 00570000001441kAAA

    Does anyone know how to get the result of the formula back? I know that by querying the sObject for the object, I can see the actual formula used for the field, but I cannot easily parse this formula and get a result from it...

    Thanks,
    -Andrew

  2. #2
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    You should be getting it back? can you post your code and let me take a look at it?

    are you sure that your field name is correct?

    Sorry for the vague answer

  3. #3
    Percy is offline Junior Member
    Join Date
    Aug 2008
    Posts
    3

    What the...?

    I know for a fact it wasn't returning it before... but it is now?

    Weird.

    Thanks anyway!

  4. #4
    mike's Avatar
    mike is offline Administrator
    Join Date
    May 2007
    Location
    Wylie, Texas
    Posts
    557
    Blog Entries
    15
    Well I guess that is a good thing Percy! Stop by if you have any other issues or maybe post some code sometime that works for you and you think may help out other PHP/Salesforce developers

    ~Mike

  5. #5
    Percy is offline Junior Member
    Join Date
    Aug 2008
    Posts
    3

    Disable SOAP WSDL Cache

    I think the problem ended up being a cache issue. I ran into some other weird issues and then finally remembered seeing random posts around the internet about disabling the cache.

    If anyone ever runs into any weird/seemingly unexplainable issue, make sure you disable the WSDL cache!

    PHP Code:
    ini_set('soap.wsdl_cache_enabled''0'); 
    Hope that helps someone!

    -Percy

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.1