• avaragado
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
In the self-service portal, a self-service user can view (and add comments to and add attachments to) all cases they've created, and - if and only if they're a self-service superuser - all cases created by other self-service users associated with the same account.

Is there any mechanism to allow finer-grained access control? Here's the use case:

A case created by a customer in the self-service portal may need input from more than one person in that customer's company, on a per-case basis. We'd like to associate each case with a list of those people, so they can be notified when the case is updated.

I've dug into the documentation and it looks like switching to the customer portal plus a bunch of account-specific sharing rules might get me somewhere, but it seems a little unwieldy and - if I'm reading the doc correctly - still doesn't seem to give me per-case access control.

It strikes me that the simplest and cheapest approach to the access control issue, though not ideal, is to make all self-service users superusers. (The notification is another problem, since Salesforce doesn't appear to support triggers on CaseComment. But ignore that.)

Any suggestions from the group?
I've got a multi-line field and I want its value in a JavaScript variable. I would like to avoid unnecessary network requests.

var value = "{!Foobar.field}";

Doesn't work as it's a multi-line field and JavaScript doesn't support literal strings with unescaped newlines. I tried this:

var value = "{!SUBSTITUTE(SUBSTITUTE(Foobar.field, "\n", "\\n"), "\r", "\\r")}";

The documentation is silent on escape sequences in strings, but \" works in SUBSTITUTE so I rashly assumed that the standard set of escape sequences would all work. But they don't; SUBSTITUTE apparently hasn't heard of \n and \r.

I've tried \012, \x0a and \u000a and get syntax errors for my trouble. Is there a way of doing what I want?
In the self-service portal, a self-service user can view (and add comments to and add attachments to) all cases they've created, and - if and only if they're a self-service superuser - all cases created by other self-service users associated with the same account.

Is there any mechanism to allow finer-grained access control? Here's the use case:

A case created by a customer in the self-service portal may need input from more than one person in that customer's company, on a per-case basis. We'd like to associate each case with a list of those people, so they can be notified when the case is updated.

I've dug into the documentation and it looks like switching to the customer portal plus a bunch of account-specific sharing rules might get me somewhere, but it seems a little unwieldy and - if I'm reading the doc correctly - still doesn't seem to give me per-case access control.

It strikes me that the simplest and cheapest approach to the access control issue, though not ideal, is to make all self-service users superusers. (The notification is another problem, since Salesforce doesn't appear to support triggers on CaseComment. But ignore that.)

Any suggestions from the group?
I've got a multi-line field and I want its value in a JavaScript variable. I would like to avoid unnecessary network requests.

var value = "{!Foobar.field}";

Doesn't work as it's a multi-line field and JavaScript doesn't support literal strings with unescaped newlines. I tried this:

var value = "{!SUBSTITUTE(SUBSTITUTE(Foobar.field, "\n", "\\n"), "\r", "\\r")}";

The documentation is silent on escape sequences in strings, but \" works in SUBSTITUTE so I rashly assumed that the standard set of escape sequences would all work. But they don't; SUBSTITUTE apparently hasn't heard of \n and \r.

I've tried \012, \x0a and \u000a and get syntax errors for my trouble. Is there a way of doing what I want?