function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Silabs AdminSilabs Admin 

salesforce sObject type 'AssignmentRule' is not supported.

Any idea why customer portal users will get this error "salesforce sObject type 'AssignmentRule' is not supported." 

 

We have overridden the case submission form. And have a SOQL that fails for customer portal users. 

 

SOQL:

 

AssignmentRule AR = new AssignmentRule(); 
AR = [select id from AssignmentRule where SobjectType = 'Case' and Active = true limit 1];

 

Best Answer chosen by Admin (Salesforce Developers) 
Tim BarsottiTim Barsotti

You could have a seperate class which does the query on the AssignmentRules that is without sharing. It would maintain the security for all other elements of your program.

All Answers

Tim BarsottiTim Barsotti

Is your class explicitly declared "Without Sharing"? 

Silabs AdminSilabs Admin

I figured removing "with sharing" does the trick, but I would like to have that on the class because of security reasons. 

 

Anything else that can be done? 

Tim BarsottiTim Barsotti

You could have a seperate class which does the query on the AssignmentRules that is without sharing. It would maintain the security for all other elements of your program.

This was selected as the best answer
Silabs AdminSilabs Admin

Tim, thanks for the suggestion. For now I have that class as "without sharging" 

 

I would like to know what Salesforce has to say about it. Why would AssignmentRule object be not avaialble to customer portal users, but to partner portal users. 

 

Anybody from product team? 

Tim BarsottiTim Barsotti

Silabs, it has to do with the profile settings. Most likely your portal users do not have "view setup and configuration" . I don't know why you would want them to be able to view configuration. http://na4.salesforce.com/help/doc/en/editing_assignment_rules.htm 

 

I would break out your class into two seperate classes, one to perform the class logic "With Sharing" and one class "Without Sharing" that queries your assignment rules. 

 

 

Silabs AdminSilabs Admin

Tim,

 

Thanks for the link, but in reality it is not. I am not showing them the setup menu and do not want to. 

 

All I want is to access AssignmentRule object via SOL which partner portal users can. 

 

I think I am good now, because I can remove "with sharing" and it works fine. 

 

Thank you for your time. Appreciate it.