4

I need a new custom button for creating Quote for specific Recordtype under Opportunities

the URL from the standard button is

the url that is produced by salesforce standard button is https://eu2.salesforce.com/0Q0/e?retURL=%2F006b000000Dhc0W&oppid=006b000000Dhc0W&RecordType=012b0000000UV7U&ent=Quote

but when I converted the URL at button level became like that: /0Q0/e?retURL={!Opportunity.Id}&oppid={!Opportunity.Id}&RecordType=012b0000000UV7U&ent=Quote

So when I click on the button I get the message "Error saving Quote" and when i click on Preview button at the button design form I get the error message

"Insufficient Privileges"

It seems that something is not correct at the URL hacking level, please advise.

2
  • 1
    show your button code please (edit the post)
    – cropredy
    Jul 26, 2015 at 3:52
  • What do you mean by "converted the URL at button level"? As @DougAyers pointed out the & should just be &, ie you want to use actual ampersands rather than the URL encoded reference. If you are using the URLENCODE() function in your button code then this may be the cause and shouldn't be needed for what you are doing.
    – Alex255
    Sep 26, 2018 at 8:48

3 Answers 3

0

The generated URL includes escaped & character as & and that is causing your URL to break. You will need to configure your button URL to use & only instead of &:

/0Q0/e?retURL={!Opportunity.Id}&oppid={!Opportunity.Id}&RecordType=012b0000000UV7U&ent=Quote
1
  • i used your code but no luck...
    – Dimi Work
    Jul 26, 2015 at 20:15
0

Make sure you have the object recordType available in your profile.. you might have a syntax error..
But my best approach with URL Hacks is to break the URL into chunks...
Something like this should work :

{!URLFOR('/0Q0/e?' + 
         '&retURL=/a09?' + Opportunity.Id +
         '&RecordType=012b0000000UV7U'+ 
         '&ent=Quote' +
         '&oppid=' + Opportunity.Id
     )}
0

Custom Button Or Link

Please find attached the screenshot from the custom button opportunity entity which creates a new Quote

The URL is

/0Q0/e?retURL={!Opportunity.Id}&oppid={!Opportunity.Id}&RecordType=012b0000000UV7U&ent=Quote

even if I delete the recordtype still get the error "Erros saving the quote"

Can someone reproduce this in development environment for the standards objects Opportunity and Quote?

thanks

You must log in to answer this question.

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