SOLVED

Re: Link to Corresponding SF Record **in Marketo**

Go to solution
DaveSilva
Level 2

Link to Corresponding SF Record **in Marketo**

Hi,

 

Does anyone have a solution to creating a direct link from Marketo to the corresponding lead/contact in SF on the Custom Person Layout so that we can easily navigate to it? I've included a screenshot of a hyperlink field, but it's not clickable.

 

Support claims there is no way to accomplish this but I'm blown away by this. With Pardot, it was easy to navigate back and forth from Pardot to SF and back with a single click.

 

2024-02-01_11-07-07.png

 

Thanks,

2 ACCEPTED SOLUTIONS

Accepted Solutions
Michael_Florin
Level 10

Re: Link to Corresponding SF Record **in Marketo**

I think Marketo Support is right in the sense that you can't create something clickable in the Person Detail View. 

 

But as every person in Salesforce has an SFDC ID, you could created a custom field in Marketo called "Salesforce Link" and then populate that field in a Change Data Value Flow Step like this:

 

 

https://your-pod-id.my.salesforce.com/{{lead.SFDC ID}}

 

 

Then add that field to your view. You can't click it, but you can at least copy/paste it into your browser.

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Link to Corresponding SF Record **in Marketo**

Field values are HTML-encoded in the Lead Detail UI, so you won’t be able to make an active <a> element.

 

You can create a bookmarklet if you want using the following simple JS (customize w/your Salesforce URL):

 

 

const mktoSfdcIdEl = document.querySelector("[name='Marketo SFDC Id']");
const mktoSfdcId = mktoSfdcIdEl.textContent;
const link = document.createElement("a");

link.target = "_sfdc-via-marketo"; /* or "_blank" if you always want a new tab */
link.href = `https://your-pod-id.my.salesforce.com/?${mktoSfdcId}`;
link.click();

 

 

 

Click the bookmarklet whenever you have a Lead Detail tab open:

SanfordWhiteman_1-1707206167383.png

 

 

View solution in original post

6 REPLIES 6
Michael_Florin
Level 10

Re: Link to Corresponding SF Record **in Marketo**

I think Marketo Support is right in the sense that you can't create something clickable in the Person Detail View. 

 

But as every person in Salesforce has an SFDC ID, you could created a custom field in Marketo called "Salesforce Link" and then populate that field in a Change Data Value Flow Step like this:

 

 

https://your-pod-id.my.salesforce.com/{{lead.SFDC ID}}

 

 

Then add that field to your view. You can't click it, but you can at least copy/paste it into your browser.

DaveSilva
Level 2

Re: Link to Corresponding SF Record **in Marketo**

Thank you. I was hoping to avoid the copy and paste, but this can work.

SanfordWhiteman
Level 10 - Community Moderator

Re: Link to Corresponding SF Record **in Marketo**

Field values are HTML-encoded in the Lead Detail UI, so you won’t be able to make an active <a> element.

 

You can create a bookmarklet if you want using the following simple JS (customize w/your Salesforce URL):

 

 

const mktoSfdcIdEl = document.querySelector("[name='Marketo SFDC Id']");
const mktoSfdcId = mktoSfdcIdEl.textContent;
const link = document.createElement("a");

link.target = "_sfdc-via-marketo"; /* or "_blank" if you always want a new tab */
link.href = `https://your-pod-id.my.salesforce.com/?${mktoSfdcId}`;
link.click();

 

 

 

Click the bookmarklet whenever you have a Lead Detail tab open:

SanfordWhiteman_1-1707206167383.png

 

 

DaveSilva
Level 2

Re: Link to Corresponding SF Record **in Marketo**

This is a great idea! Though, I can't get it to work for some reason.

Initially it worked, but I need to amend the URL and now it doesn't do anything when I click on it 🤔

I wonder if Edge is blocking the JS or something.

 

const mktoSfdcIdEl = document.querySelector("[name='Marketo SFDC Id']");
const mktoSfdcId = mktoSfdcIdEl.textContent;
const link = document.createElement("a");

link.target = "_new";
link.href = `https://fiixsoftware.lightning.force.com/lightning/r/Lead/${mktoSfdcId}/view`;
link.click();
SanfordWhiteman
Level 10 - Community Moderator

Re: Link to Corresponding SF Record **in Marketo**

Works fine in Edge for me.  But I did have a typo in the comment above, I meant "_blank", not "_new" if you want a new tab each time. Delete your current bookmarklet, make that change, and try it again, please.

DaveSilva
Level 2

Re: Link to Corresponding SF Record **in Marketo**

Ah yes, I got it working. Thanks!