Skip to main content

I am trying to set up a button with a redirect url code. The code we need to use for the button is (without directing to this particular account): https://procoretechnologies–zqu.na29.visual.force.com/apex/CreateQuote?crmAccountId=0013400001JkD3tAAF&oppId=00634000019hw9hAAA&quoteType=Subscription&stepNumber=2

We used this inline code in the redirect url section: 
https://procoretechnologies–zqu.na29.visual.force.com/apex/CreateQuote?crmAccountId={{#urlEncode}}{{AccountId}}{{/urlEncode}}&oppId{{#urlEncode}}{{Id}}{{/urlEncode}}&quoteType=Subscription&stepNumber=2

However we are getting an error message and it doesn’t direct us to the correct page. Any thoughts?

Thanks so much!

Great question!


Try a triple mustache on the Id fields.  The double mustache usually has SKUID render the field as a URL with the name field displaying.  The extra mustache merges the raw value of the reference field.  

Also, you shouldn’t need to wrap with the urlEncode for the Id fields as they are always alphanumeric with no special characters.  Here’s the adjustment:

https://procoretechnologies–zqu.na29.visual.force.com/apex/CreateQuote?crmAccountId={{{AccountId}}}&oppId{{{Id}}}&quoteType=Subscription&stepNumber=2


Just noticed you left out an = in your oppId URL Parameter.  Here’s another adjustment: 

https://procoretechnologies–zqu.na29.visual.force.com/apex/CreateQuote?crmAccountId={{{AccountId}}}&oppId={{{Id}}}&quoteType=Subscription&stepNumber=2


I appreciate your help on this but unfortunately this still is not working for me 😦 Getting a visualforce error


What’s the error being generated an how does the url render?


quoteType must be set as a URL parameter 

An unexpected error has occurred. Your solution provider has been notified. (zqu)


https://procoretechnologies–zqu.na29.visual.force.com/apex/CreateQuote?crmAccountId=0018000001H0QH7AAN&oppId=00634000019SVR1AAO"eType=Subscription&stepNumber=2


You have a special string in the url that is being converted to the actual character when it is being rendered.  &quot is used for a quotation mark (usually used as ").  The result is that: 

&quoteType=Subscription&stepNumber=2 

is converted to:

"eType=Subscription&stepNumber=2

in other words ‘&quot’ is converted to ‘=’

This is a really stupid parameter convention on the part of the service provider (I would consider this a bug), but you can probably get around it by moving that parameter first.  Outside of this you can try escaping the string, but I can’t give you a specific tip on that without some fiddling.  Try this to build the url in the sequence referenced above:

https://procoretechnologies–zqu.na29.visual.force.com/apex/CreateQuote?quoteType=Subscription&stepNumber=2&crmAccountId={{{AccountId}}}&oppId{{{Id}}}


Kristyn,

I think you need to append the namespace for Zuora in front of your apex page reference.  Please try this URL:


/apex/zqu__CreateQuote?quoteType=Subscription&stepNumber=2&crmAccountId={{{AccountId}}}&oppId{{{Id}}}


Note that you should not add the ‘site’ to your URL.  The ‘site’ is the “https://procoretechnologies–zqu.na29.visual.force.com” preceding the part you need.  This will cause the URL to fail in a sandbox.

Thanks,

Bill


IT WORKED! Thank you so much! 🙂