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
dev_002dev_002 

Unable to Access Visualforce page.

Hi, I've been following developer forum for quite some time. The posts are have been very useful for me. 

 

I have been developing a visualforce page, replacing "new" opportunity button with a custome visualforce page. 

The issue we have encountered here is, other profile user are not able to access to the new visualforce page for opportunity. 

When the users click on the "new" button, the message is saying that the users are having insufficient priviledge to access to create a new opportunity. 

 

 

Blow is my code, which replaces the "new" button on opportunity.

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

<apex:page standardController="Opportunity" sidebar="true" extensions="OppDefaultFieldVal"  >
    <apex:sectionHeader title="Edit Opportunity" subtitle="{!opportunity.name}"/>
    <apex:form >
          <apex:pageBlock title="Edit Opportunity" id="thePageBlock" mode="edit">
             <apex:pageMessages />
            <apex:pageBlockButtons >
                 <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}" rendered="true"/>               
               </apex:pageBlockButtons>
            <apex:actionRegion >
                <apex:pageBlockSection title="Basic Information" columns="1">
                    <apex:outputField value="{!opportunity.recordtypeid}"/>
                    <apex:inputField value="{!opportunity.Salesperson__c}"/>
                    <apex:inputField value="{!opportunity.name}" />
                    <apex:inputField value="{!opportunity.closedate}"/>
                    <apex:inputField value="{!opportunity.StageName}"/>
                    <apex:inputField value="{!opportunity.accountid}"/>
                    <apex:inputField value="{!opportunity.Credit_Terms__c}" />
                    <apex:inputField value="{!opportunity.Description}"/>
                </apex:pageBlockSection>
            </apex:actionRegion>
          </apex:pageBlock>
    </apex:form>
</apex:page>
______________________________________________________________________________________________
I hope anyone could help me to solve this issue.
Thank You.
Best Answer chosen by Admin (Salesforce Developers) 
aballardaballard

Is the PAGE accessible? (From the Pages list view, click on the security link next to the page...) 

All Answers

aballardaballard

Have you set up sharing to allow acces to the page to the other profiles?  

Fan YangFan Yang

You need ensure "other user' have the privilage (CRUD) to the opportunity object.

dev_002dev_002

Hi, thanks for the reply, i have enabled the opportunity creation in the profile setting. Still the page is not accessible.

aballardaballard

Is the PAGE accessible? (From the Pages list view, click on the security link next to the page...) 

This was selected as the best answer
dev_002dev_002

Aballard:

Thank you so much. No the page is accessible....i have made the changes on the security settings.