You need to sign in to do that
Don't have an account?
Vorno
ampersand (&) in Account Name
Hey,
Having a problem updating an Account Name where an ampersand is present.
PHP is returning the following error:
Uncaught SoapFault exception: [soapenv:Client] The entity name must immediately follow the '&' in the entity reference.
Now I've tried escaping the ampersand (eg: \&) to no avail... Is there a way to use this character with PHP / Salesforce API ? Can I use Unicode or HTML encoding on this?
Having a problem updating an Account Name where an ampersand is present.
PHP is returning the following error:
Uncaught SoapFault exception: [soapenv:Client] The entity name must immediately follow the '&' in the entity reference.
Now I've tried escaping the ampersand (eg: \&) to no avail... Is there a way to use this character with PHP / Salesforce API ? Can I use Unicode or HTML encoding on this?
$str = htmlspecialchars($str);
All Answers
I am having the same problem but can't find any info on what needs to be changed.
I'm using the sample login.php that comes with the php developer toolkit 1.1, it works fine to edit account unless they have an ampersand in the company name, in which case I get this error:
There was a problem with your login: The entity name must immediately follow the '&' in the entity reference.
If anyone can help i'd appreciate it.
I use a php function I wrote:
Code:
then when I'm adding fields to a new sObject:
$oppfields["Name"] = fixamp("$accname - $month $year");
(as an example).
I was thinking about using a script to do this but it seemed a little long-winded for such a simple thing. I got some advice from Mike Simonds and just changed this line:
Code:
to this:
Code:
Check out his salesforce tutorials if you haven't come across his site already: www.mikesimonds.com
Now it works fine, but I'm confused as to why it didn't work in the first place because I didn't change anything in the toolkit and it doesn't seem like that many people have had this problem. Any ideas?
<slugmandrew>
$str = htmlspecialchars($str);
In another thread, html encoding to hex instead of the entity name worked for me with extended characters and unicode.