2

Here i have one issue, i am not able to create new Quote record from custom commandButton which i declared in Visualforce page..

i do not want to predefined Opportunity from Lookup field.. What i want is when i click on Create New Quote Button (custom button from VF Page) then only allow me to create new Quote and at that i am going to select Opportunity manually from the lookup field.

Hope this is clear !!

Let me show you the URL which i am using in action of commandButton

<apex:commandButton value="Create New Quote" action="/0Q0/e?retURL=%2F0063600000D5oyO&oppid=0063600000D5oyO"/>

Now, What should i do to replace OpportunityID which is passed twice in above URL ?

2 Answers 2

1

Just remove this parameter from the action &oppid=0063600000D5oyO and you will not get pre-fill value of Opportunity.

Update: As Opportunity is required so we can't remove this from parameter we need to create a custom VF page and override the standard edit page to overcome this functionality.

6
  • See, i modified it <apex:commandButton value="Create New Quote" action="/0Q0/e?retURL=%2F0063600000D5oyO" /> but getting this Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors.
    – Nihar
    Dec 27, 2016 at 12:59
  • @Nihar try action="/0Q0/e" Dec 27, 2016 at 13:15
  • Nope Tushar, Getting same error 'insufficient Privileges'
    – Nihar
    Dec 27, 2016 at 13:17
  • @Nihar is Quote enable in your org or you can create it using native button? Dec 27, 2016 at 13:41
  • Yes Quote is enable
    – Nihar
    Dec 27, 2016 at 13:42
2

We have to provide the Id of the Opportunity since Opportunity and Quote is a Master-detail relationship.

We cannot make the opportunity to be blank.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .