1

I'm setting up Pardot by adding a button in Salesforce to bring prospects over to the Pardot platform by following the setup guide exactly. The following code is throwing an error even though it's copied right from the guide.

My code:

https://pi.pardot.com/list/pullCrmCampaign/
fid/{!Campaign.Id}/campaignName/
{!URLENCODE(Campaign.Name)}/leadCount/
{!Campaign.NumberOfLeads}/contactCount/
{!Campaign.NumberOfContacts}?sessionid={!$Api.
Session_ID}&serverurl={!$Api.Partner_Server_URL_90}

My code throwing an error:

pardot setup button error $api


Page from the setup manual where the code was copied from:

pardot apex code button salesforce

4

Don't use new lines randomly. In this case, you broke up {!$Api and .Session_ID}, so the system didn't recognize the merge field correctly. The formula should look exactly as shown in the doc, one long continuous text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.