• dev_002
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

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.