• Boulder Mike
  • NEWBIE
  • 15 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 10
    Replies
I have an idea for a knock-out application that would be great as an AppExchange application.

I've seen that the OEM edition includes 5 tabs and 50 custom objects.  What about...

(1)  Reports tab -- I really don't want to have to code my own reports component
(2)  Dashboards would be nice
(3)  If either or both of those are available, do they count against your 5 tab limit?

Thanks!

Okay, I give up. I'm playing with the new AJAX toolkit and I'm not sure how to use the Hello World example as an s-control. (I've only created URL-based s-controls before, not "real" s-controls.) So this is a really basic question about how to create the s-control .

When defining the s-control, do I paste the (entire) HTML file directly into the HTML Body field? (Of course I tried this, but the Custom Link doesn't appear to work.)

Or do I use the file selection tool to select the HelloWorld.htm file? If so, what do I put into the HTML Body field to refer to the HelloWorld.HTM file?

Thanks much.
I've found that because PHP 5.0.4 doesn't handle "create" or "update" very well because of how it tries to interpret the abstract class of "sObjects".

A couple of people have posted work-arounds on blogs elsewhere (see below for links). As of PHP 5.1.0 and PHP 5.0.5 (neither of which have been released yet), the SOAP support will become much more flexible and will do several things:

    • Handle the session header more elegantly

    • Allow you to call sForce methods directly -- no need to overload the "call" method


    PHP 5.1.0 looks to be finalized in September.


    http://www.schlossnagle.org/~george/blog/index.php?/archives/235-Salesforce.com-and-PHP.html and http://www.suraski.net/blog/index.php?/archives/5-PHP-5s-SOAP-extension-and-SalesForce.html
    I've run into the old snag that SOQL doesn't support the "ORDER BY" clause and I'm wondering if anyone has come up with a way to sort a result set from a query using PHP5.

    PHP5 has a (rather complicated) function called usort that allows for user-defined sorts, but before I invest a bunch of time figuring out that function, I thought I'd throw the question out to the community.

    Anyone have any other suggestions?

    Another thought would be to dump the each record's fields into an array and then sort the array. That'd work, but still, it seems like a lot of pain for something so fundamental.

    (I'm searching a custom object that contains a catalog of items. I'd like the items in order by item number.)
    I'm using PHP 5.0.4 and have been able to query objects, but haven't yet been able to retrieve results from the object getting passed back from Salesforce. I think the problem is that PHP's SOAP tools don't correctly assign the returned object as the specific type of object, but instead everything is assigned the generic sObject type.

    For example:
    // Using PHP5's SOAP tools to access SFDC and reassign the endpoint and header.
    // $SESSION and $ENDPOINT are passed-in from the custom link in Salesforce.
    $wsdl = "file://E:/webroot/sfdc/enterprise.wsdl.xml";
    $client = new SoapClient( $wsdl , array('trace' => 1) ) ;
    $client->__setLocation($ENDPOINT);
    $sessheader = new SoapHeader('urn:enterprise.soap.sforce.com', 'SessionHeader',
    (object) array('sessionId'=>$SESSION), 0);

    // Lookup the user's id from SFDC
    $user = array('type'=>'user'); // In this case, this doesn't matter
    $result = $client->__soapCall('getUserInfo', array((object) $user) , NULL,
    $sessheader, $ohdrs);
    print "User ID: ".$result->result->userId . "
    ";
    $userId = $result->result->userId ;

    // Lookup user's address, phone, etc.
    $query = "Select Id, Username, LastName, FirstName, Street, City, State, PostalCode, Email, Phone FROM User WHERE Id = '$userId'";
    $query_array = array('queryString' => $query );
    $result2 = $client->__soapCall('query', array((object) $query_array) , NULL,
    $sessheader, $other_headers );

    // You can see from the getLastResponse that the result is getting returned
    echo "
    Last Response:
    ";
    echo $client->__getLastResponse();
    echo "

    ";

    // Access the records returned
    $records = $result2->result->records;


    At this point, even though I can access the records object, I can't access the fields returned. I think it may be possible to use Soap_Vars to force the returned object to be a User object instead of an sObject, but I'm reaching.

    Anyone gotten this far yet using PHP5? Any clue hot to proceed?

    Michael
    Since it doesn't look like I can update field labels, how about changing picklist values programmatically?
    I've noticed in the API documentation that I can access lots of details about all of my fields, including the label of the field.

    I'd like to be able to change the label of a custom field programmatically. The field label contains the current month-name.

    Has anyone ever accomplished this?
    Okay, I give up. I'm playing with the new AJAX toolkit and I'm not sure how to use the Hello World example as an s-control. (I've only created URL-based s-controls before, not "real" s-controls.) So this is a really basic question about how to create the s-control .

    When defining the s-control, do I paste the (entire) HTML file directly into the HTML Body field? (Of course I tried this, but the Custom Link doesn't appear to work.)

    Or do I use the file selection tool to select the HelloWorld.htm file? If so, what do I put into the HTML Body field to refer to the HelloWorld.HTM file?

    Thanks much.

    I have installed PHP 5.0.4 and all the required PEAR and SOAP libraries, etc.

    The PHP samples work fine.

    My question is what do i do with the WSDL file I was asked to create during the setup if I am not programming in an environment like .NET, Apache or Java. Am I missing something here?

    Thanks in advance.

    • September 15, 2005
    • Like
    • 0
    I've run into the old snag that SOQL doesn't support the "ORDER BY" clause and I'm wondering if anyone has come up with a way to sort a result set from a query using PHP5.

    PHP5 has a (rather complicated) function called usort that allows for user-defined sorts, but before I invest a bunch of time figuring out that function, I thought I'd throw the question out to the community.

    Anyone have any other suggestions?

    Another thought would be to dump the each record's fields into an array and then sort the array. That'd work, but still, it seems like a lot of pain for something so fundamental.

    (I'm searching a custom object that contains a catalog of items. I'd like the items in order by item number.)
    Hi,

    I have downloaded the PHPClient its working perfectly. No issues about it. But my client for whom I am developing an interface through which he will connect Salesforce and import data, doesn't want to install PEAR:SOAP module on his server as he has some issues regarding updating the server....

    So only option left to me is connect Salesforce using fsocket. The deadline to complete the task is almost over. Please let me know if it is possible also an example would be a great help.

    Thanks,
    SB1506.

    Message Edited by SB1506 on 08-04-2005 04:47 AM

    • August 04, 2005
    • Like
    • 0

    I'm trying to implement the sample Google Maps S-Control, and not having much luck.

    I'm about ready to abandon the idea, but thought I'd check for some assistance first.

    I'm referring to the sample s-Control which does not require your own server, and is described at:
        http://salesforce.breezecentral.com/buildgmaps/

    I've followed the proscribed steps of:
       > Adding two custom fields to Account, Contact, and Lead
       > Building the sControl from the sample code
       > Creating a Web tab
       > Configuring the browser to allow "Access data sources across domains"

    When I open the page, I get:

       > Pop-up message:
    "The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://www.google.com/apis/maps"

       > Errors displaying the page:
    "Line 721, char 2, Error: 'GIcon' is undefined, Code 0
    URL: https://ssl.salesforce.com/servlet/servlet.Integration?lid=01N00000000007b&enc-UTF-8
    Line 736, char 1, Error: 'GMap' is undefined, Code 0
    URL: https://salesforce.com/servlet/servlet.Integration?lid=01N00000000007b&enc-UTF-8

       > The dialogs (e.g. picking criteria and searching) don'e function.

    I tried the api page mentioned in the message but, if I'm reading this right, it appears that I'd need to apply for an api key for one of the salesforce.com urls?

    Any thoughts gratefully accepted.

    Scot


    Updated the first link, and removed links which are just text.

    Message Edited by Scot on 07-27-2005 05:53 PM

    • July 27, 2005
    • Like
    • 0
    I'm using PHP 5.0.4 and have been able to query objects, but haven't yet been able to retrieve results from the object getting passed back from Salesforce. I think the problem is that PHP's SOAP tools don't correctly assign the returned object as the specific type of object, but instead everything is assigned the generic sObject type.

    For example:
    // Using PHP5's SOAP tools to access SFDC and reassign the endpoint and header.
    // $SESSION and $ENDPOINT are passed-in from the custom link in Salesforce.
    $wsdl = "file://E:/webroot/sfdc/enterprise.wsdl.xml";
    $client = new SoapClient( $wsdl , array('trace' => 1) ) ;
    $client->__setLocation($ENDPOINT);
    $sessheader = new SoapHeader('urn:enterprise.soap.sforce.com', 'SessionHeader',
    (object) array('sessionId'=>$SESSION), 0);

    // Lookup the user's id from SFDC
    $user = array('type'=>'user'); // In this case, this doesn't matter
    $result = $client->__soapCall('getUserInfo', array((object) $user) , NULL,
    $sessheader, $ohdrs);
    print "User ID: ".$result->result->userId . "
    ";
    $userId = $result->result->userId ;

    // Lookup user's address, phone, etc.
    $query = "Select Id, Username, LastName, FirstName, Street, City, State, PostalCode, Email, Phone FROM User WHERE Id = '$userId'";
    $query_array = array('queryString' => $query );
    $result2 = $client->__soapCall('query', array((object) $query_array) , NULL,
    $sessheader, $other_headers );

    // You can see from the getLastResponse that the result is getting returned
    echo "
    Last Response:
    ";
    echo $client->__getLastResponse();
    echo "

    ";

    // Access the records returned
    $records = $result2->result->records;


    At this point, even though I can access the records object, I can't access the fields returned. I think it may be possible to use Soap_Vars to force the returned object to be a User object instead of an sObject, but I'm reaching.

    Anyone gotten this far yet using PHP5? Any clue hot to proceed?

    Michael

    OK, I read the readme and have followed it. When I select option 1 on the menu (login), I get the following error message:

    C:\Salesforce-0.54\quickstart>quickstart
    1. Login
    2. Get Accounts
    3. Update Accounts
    Enter a menu option: 1
    User name: name@domain.suffix
    Password: *****
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at org.apache.axis.handlers.BasicHandler.(BasicHandler.java:81)
            at org.apache.axis.client.Service.getAxisClient(Service.java:143)
            at org.apache.axis.client.Service.(Service.java:152)
            at com.sforce.soap.enterprise.SforceServiceLocator.(SforceServiceLocator.java:10)
            at com.salesforce.quickstart.quickstart.doLogin(quickstart.java:186)
            at com.salesforce.quickstart.quickstart.mainLoop(quickstart.java:61)
            at com.salesforce.quickstart.quickstart.(quickstart.java:34)
            at com.salesforce.quickstart.quickstart.main(quickstart.java:30)
    Caused by: org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory
            at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:176)
            at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201)
            at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195)
            at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
            at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
            at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
            at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:84
    )
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:80)
            at org.apache.axis.components.logger.LogFactory.(LogFactory.java72)
            ... 8 more

    C:\Salesforce-0.54\quickstart>

    • November 29, 2004
    • Like
    • 0