You need to sign in to do that
Don't have an account?
ying liu
profile permission for webservice method
I hava a global class:
global class Test
{
webservice static void send(Id eventId)
{
}
}
I want to call this webserive method from custom button. Javascript in this button:
{!REQUIRESCRIPT("/soap/ajax/18.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/18.0/apex.js")}
var eventId = '{!Event__c.Id}';
sforce.apex.execute("Test", "send", {eventId : eventId});
window.location.reload();
Two users:
1. user:TestAdmin;profile:AdminProfile(salesforce license)
2. user:TestUser;profile:CustomerProfile(salesforce platform license)
Both of two profiles have no access to this global class(Test).
TestAdmin can use the button normally but TestUser cannot use this button which will show error message:
{faultcode:'sf:INSUFFICIENT_ACCESS', faultstring:'Test: no access allowed to this class.', }
I cannot find the reason and I want to know if there are any setting for profile to access webservice method without class permission?
Thanks in advance.
global class Test
{
webservice static void send(Id eventId)
{
}
}
I want to call this webserive method from custom button. Javascript in this button:
{!REQUIRESCRIPT("/soap/ajax/18.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/18.0/apex.js")}
var eventId = '{!Event__c.Id}';
sforce.apex.execute("Test", "send", {eventId : eventId});
window.location.reload();
Two users:
1. user:TestAdmin;profile:AdminProfile(salesforce license)
2. user:TestUser;profile:CustomerProfile(salesforce platform license)
Both of two profiles have no access to this global class(Test).
TestAdmin can use the button normally but TestUser cannot use this button which will show error message:
{faultcode:'sf:INSUFFICIENT_ACCESS', faultstring:'Test: no access allowed to this class.', }
I cannot find the reason and I want to know if there are any setting for profile to access webservice method without class permission?
Thanks in advance.
https://help.salesforce.com/HTViewHelpDoc?id=code_package_security.htm&language=en_US
All Answers
My AdminProfile is copied from System Administrator profile.
And I have checked the security of the Test Class there is no my AdminProfile there.
https://help.salesforce.com/HTViewHelpDoc?id=code_package_security.htm&language=en_US