• RayG
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 4

Hello All


I have a force.com site in which users (i call them users but they are just contacts in my Org, not real SF users) can login and log cases, attach files etc. (please ignore the similarity to cutomer portal - it is a given state).


another functionality is that a user can view logged cases along with their comments and attachments (and is able to download the attachments).

everything was working fine untill i created an assignment rule for the new cases inserted to be directed to a queue.

Now, once the user logs in to the site and tries to download an attachment, he gets an authoriztion required page.


Now, i was thinking permissions - but i can still see the case, comments and attachments just fine. the only thing that isnt working is when i try to download an attachment.


I am using the

{!URLFOR($Action.Attachment.Download, attachmentId)}



any insights will be most appreciated.



I have a custom button on the Event Page Layout designed to summarize the account/contact/event information from an event.


However, we require that an account be associated to the event in order to use the button.


The What field can be a number of different object types.


How can I programmatically ensure that the what is in fact an account and not something else?


Using javascript, I attempted to use the accountid:


var eventAccount = '{!Event.accountId }';


but there is no actual accountid field on Events.


"Field Event.accountId does not exist. Check spelling."


Is there a way to access accountid via javascript?


Thanks for the help!

Hello all,

do you know if SF support in (parsing) XML that encoding in UTF-16.


the probem is that I send httpRequest and I received the xml but if I'm trying to display the content or just pars the xml an errror message raise "ParseError at [row,col]:[1,1]Message: Content is not allowed in prolog."

1.) I already trying to setHeader(before the http.send) to content-type,UTF-16 (;charset=utf-16).
2.) I'm trying to display the (getBody()) of the xml in visualforce page - and I recieved a lot weird charcters,
like question mark or something.

3.) all those problems not happened if the xml encoded in UTF-8.


ErrorLog4 = ''; HttpRequest req = new HttpRequest(); req.setEndpoint(XML FILE PATH); req.setMethod('GET'); req.setHeader('Content-Type', 'text/xml'); Http http = new Http(); HTTPResponse res = http.send(req); String responseBody = res.getBody() ; Xmlstreamreader xmlreader = new Xmlstreamreader(responseBody) ; try { ErrorLog1 += responseBody ; // Weird Characters been displayed //ErrorLog3 += xmlreader.nextTag() ; // Error message }

 Thanks in advance,


  • December 23, 2009
  • Like
  • 0

I'm currently trying to send a soap message to logon to my salesforce application. I send the following message:

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <login xmlns="urn:enterprise.soap.sforce.com">
      <username />
      <password />

I get the following reply:

<?xml version="1.0" encoding="utf-16"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <faultstring>Content is not allowed in prolog.</faultstring>

I'm using a webservice test tool called webstudio (downloaded from gotdotnet). It allows me to invoke the 'login' webservice via a .net proxy called which works fines, but when I use it to invoke the 'login' method via http soap request it fails as above.

Please can anyone explain why salesforce is returning this error. Can anyone send me a complete soap request that will allow me to call the 'login' method, as I'm guessing salesforce doesn't like something in the soap I'm sending it.

Thanks very much in advance for any help.