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
Sekhar SekharSekhar Sekhar 

Page not allowed for the profile

Hi Friends
When i am click on custom button in CRM account then it is working fine
But when i am click on same custom buttons in Community Portal it showing a error message like
a problem with the onclick javascript for this button or link was encountered
{faultcode:'soapenv:Server',faultstring:'Page not allowed for the profile',}

my custom button code is

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
window.open("/apex/GenerateInvoice?id={! Work_Order__c.Id }",'_blank');
var oppty= '{!Work_Order__c.Id }';
var result = sforce.apex.execute('Generateinvoice' ,'FieldServieRates',{opptyId:oppty});
 
Here my Class(Generateinvoice) is global and Method(FieldServieRates) is webservices

User-added image

Thank You
Ruwantha  LankathilakaRuwantha Lankathilaka
Go to the relevant user's profile and add the visualforce page permision. To do this you should know the visualforce page name that involve on the "Genarate" button click.

Quick find box -> search "Profiles" -> find the "Visualforce" -> add the visualforce page persmision for the profile.

Please make sure to mark this as the best answer if this help you, as it could help more people in the community in future.
Sekhar SekharSekhar Sekhar
Hi Ruwantha Lankathilaka,

I am already added  the visualforce page and class (related to button class and vf page ) to  My community portal profile  

Even though when i am click on same custom buttons in Community Portal it showing a error message like
a problem with the onclick javascript for this button or link was encountered
{faultcode:'soapenv:Server',faultstring:'Page not allowed for the profile',}



Thank You.
 
Simangaliso Mathenjwa 6Simangaliso Mathenjwa 6
HI @Sekhar Sekhar, did you solve this?, I have the same problem
Simangaliso Mathenjwa 6Simangaliso Mathenjwa 6
Hi HI @Sekhar Sekhar I found the answer :

In order for a Community user to see a Visualforce page, two things have to happen. First, the page has to be exposed to the Community, this is done from: Communities > Manage Communities > Force.com > Public Access Settings > Enable Visualforce Page Access

Second, the page has to be exposed to the profile of the community user, this is done from: Setup > Manage Users > Profile > Click on Profile Name > Visualforce Page Access