• pokpokpalayok
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

Hi,

 

Can anyone suggest how to alias field in SOQL? I'm trying to last 4 field coz it's all in type->User

 

Select a.AccountNumber, a.BillingCity, a.BillingCountry, a.BillingPostalCode, a.BillingState, a.BillingStreet, a.Id, a.Name, Owner.Name as `OName`, CreatedBy.Name as 'CName`, LastModifiedby.Name as `LName` from Account a

 

If these is not possible, can anyone suggest the best approach.

 

thanks.

hi,

 

I'm tried logging in from my localhost domain to Salesforce using ajax toolkit but unsuccessful after serveral weeks of research and attempts. I know a little bit of php so I tried using php toolkit. After 1-2 days of  I'm able to log in and query objects.

 

So my question is how come php toolkit works and ajax toolkit doesn't? I saw some link saying ajax toolkit can't be done because of cross domain policy, but how come php works? 

 

Help pls.

 

Thanks

hi,

 

I'm new to salesforce and wanted to use my data ( contact, account, opportunities, etc )  in Palm Pre. Can someone please help me how to get things started?

 

Thanks in advance.

Hi,

 

I'm trying to pull out the values from a query (just pulling 1 id,name in this case); it works fine when I print the full result, but when I try to get each one it doesnt work.

 

 

 

$queryResult = $mySforceConnection->query($query); $records = $queryResult->records; foreach ($records as $record) { $record = new SObject($record); $_id = $record->Id; $_name = $record->fields->Name; echo $_id; echo $_name; } foreach ($records as $record) { print_r($record); }

 

 it outputs:

 


Notice: Trying to get property of non-object in /srv/home-www/salesforce/test.php on line 50


0

 

SObject Object ( [type] => Account [fields] => stdClass Object ( [Name] => TheStreet.com Inc ) [Id] => 0018000000ZIXKWAA5 ) 

 

 

Any ideas?  Looked around and saw about 10 different ways to grab the info but none of them worked.  Thanks!

 

Casey

 

I am new to SFDC integration code.  I wrote a basic webservice class in APEX and exported the WSDL.  I understand that I'll need a login call to obtain a session id.

 

Is there a way to add login tags to the class WSDL so that I can use just one WSDL file in the external system?

 

If so what tags can I add to the class WSDL header or body?

 

Thanks in advance.

Ever since relationship fields came out, I've always had a hard time getting values from them in a SOQL query.  I've been able to write a reliable function to retrieve values for fields on the main object or in a relationship one level deep, but my function falls down (does not scale) when looking relationships further away. 

 

For example, the query select id, status, lead.company, contact.account.name from CampaignMember limit 5, I am able to grab Status off CampaignMember and Lead.Company, but my function has trouble getting contact.account.name.

 

Bottom line is that I wanted to ask the community if they've written a "get a value from an sObject" function that is capable of hanlding relationship fields no matter how many objects away they are.

 

 

  • February 23, 2009
  • Like
  • 0