-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
9Questions
-
8Replies
Help with Chinese!
Need help with PHP toolkit v. 13. Been using it successfully since first released, until now.
Client entered data into data-entry web page in CHINESE!
When I do add a record to the Lead object using this data, I'm getting an error something like:
Entity "aring" referenced but not declared.
I know that å represents the Scandinavian "A" with a ring above it, but have no idea how it's getting that from the Chinese characters, or worse, how to fix it.
An older application using an earlier WSDL seems to be working fine. No difference in Xhtml headers between the two.
Any ideas how to deal with this?
Any and all help would be greatly appreciated. We cannot deploy the current application. The client has offices in China.
Thank you
-
- AAKAlan
- May 15, 2010
- Like
- 0
- Continue reading or reply
How to handle special characters in query in PHP
I've gotten pretty proficient at escaping characters as needed, but this time the problem is in a query itself.
Here's the basic code. It's using the SalesForce.com PHP toolkit:
$userid = $_POST["userid"];
$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection('partner.wsdl.xml');
$mylogin = $mySforceConnection->login($username, $password);
$userid = htmlentities($userid);
$query = "select id from contact where User_ID__c ='$userid'";
$response = $mySforceConnection->query($query);
$queryResult = new QueryResult($response);
It's the query, that's breaking because there's a backslash ("\") in the userid ("alan\katz").
Unfortunately, I can't control the userids, so I'm stuck with it.
Here's the error:
-
- AAKAlan
- August 21, 2009
- Like
- 0
- Continue reading or reply
Character Set in PHP SOAP
Hi,
I'm having a problem with a German "u-umlaut" using PHP SOAP, the PHP Toolkit and IE 7.
I'm retrieving data from a Salesforce object (Lead).
It includes a German name that has umlauts (u with 2 dots) in the company name.
It is showing in the browser as two boxes. If I change the HTML charset, I get even worse : a Spanish n-cedilla followed by "1/4".
In no case have I been able to see or save the u-umlaut
I have changed charset in the generated HTML, even in the WSDL and yet the umlauts are escaping me completely.
What am I doing wrong? This has to be some kind of charset problem.
Thanks in advance,
Alan
-
- AAKAlan
- May 14, 2009
- Like
- 0
- Continue reading or reply
SOQL has apparently lost a field?
Hi,
I'm having a wierd query problem with the lead object.
Here's my SQL query:
$query = "select FirstName, LastName, Address, Company, Phone, Email from lead where Id = '$leadid'";
Unfortunately, running this query via the API, I keep getting the following error message:
INVALID_FIELD: select FirstName, LastName, Address, Company, Phone, Email from ^ ERROR at Row:1:Column:29 No such column 'Address' on entity 'Lead'. 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.
I have checked the lead object over and over again using Setup/Customize/Fields and "Address" appears to be a perfectly valid fieldname. However, when I remove "Address" from the query, it works perfectly.
Any idea why the query is rejecting the Address field?
Thanks in advance....
P.S. Using the Partner WSDL.
-
- AAKAlan
- March 27, 2009
- Like
- 0
- Continue reading or reply
How to override, but not override?
Question about a salesforce.com button.
I have a highly customized activity.
It has a Save button (standard button)
I need to put in some Javascript validation/update code before the save of the current record executes.
How do I do this?
Is there some way to add the code to a Save button without destroying its save functionality?
Or should I create a custom Save button and hide the built-in Save Button. If this is the case, what syntax do I use to cause the new, unsaved page to save and update() the object?
Thank you. This is my first Salesforce button. I've done a lot of remote SOAP stuff with Salesforce, but this is my first time wrestling with the UI.
-
- AAKAlan
- March 08, 2009
- Like
- 0
- Continue reading or reply
Can You Update SalesForce From Remote Application?
-
- AAKAlan
- December 10, 2008
- Like
- 0
- Continue reading or reply
Help! Trying to link to SalesForce with Ajax
-
- AAKAlan
- December 10, 2008
- Like
- 0
- Continue reading or reply
First remote application, need help with field data types
-
- AAKAlan
- December 09, 2008
- Like
- 0
- Continue reading or reply
Two newbie questions...
-
- AAKAlan
- October 01, 2008
- Like
- 0
- Continue reading or reply
How to handle special characters in query in PHP
I've gotten pretty proficient at escaping characters as needed, but this time the problem is in a query itself.
Here's the basic code. It's using the SalesForce.com PHP toolkit:
$userid = $_POST["userid"];
$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection('partner.wsdl.xml');
$mylogin = $mySforceConnection->login($username, $password);
$userid = htmlentities($userid);
$query = "select id from contact where User_ID__c ='$userid'";
$response = $mySforceConnection->query($query);
$queryResult = new QueryResult($response);
It's the query, that's breaking because there's a backslash ("\") in the userid ("alan\katz").
Unfortunately, I can't control the userids, so I'm stuck with it.
Here's the error:
- AAKAlan
- August 21, 2009
- Like
- 0
- Continue reading or reply
SOQL has apparently lost a field?
Hi,
I'm having a wierd query problem with the lead object.
Here's my SQL query:
$query = "select FirstName, LastName, Address, Company, Phone, Email from lead where Id = '$leadid'";
Unfortunately, running this query via the API, I keep getting the following error message:
INVALID_FIELD: select FirstName, LastName, Address, Company, Phone, Email from ^ ERROR at Row:1:Column:29 No such column 'Address' on entity 'Lead'. 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.
I have checked the lead object over and over again using Setup/Customize/Fields and "Address" appears to be a perfectly valid fieldname. However, when I remove "Address" from the query, it works perfectly.
Any idea why the query is rejecting the Address field?
Thanks in advance....
P.S. Using the Partner WSDL.
- AAKAlan
- March 27, 2009
- Like
- 0
- Continue reading or reply
Help! Trying to link to SalesForce with Ajax
- AAKAlan
- December 10, 2008
- Like
- 0
- Continue reading or reply
First remote application, need help with field data types
- AAKAlan
- December 09, 2008
- Like
- 0
- Continue reading or reply
Two newbie questions...
- AAKAlan
- October 01, 2008
- Like
- 0
- Continue reading or reply