Hi! I am currently trying to implement a Salesforce JS button into my Skuid page. The reference fields in the URL are not pulling dynamically and I was wondering what the correct format would be or if I need to create new variables in my code. (I am not JS savvy).
Original SF button code:
var u = “https://www.toutapp.com/pitches/new?name={!Contact.Name}&email={!Contact.Email}&salesforce_contact_id={!Contact.Id}}&force_bookmarklet=true&style=salesforce”;
var w = window;
w.open(u,‘Tout’,‘scrollbars=1,status=1,width=762,height=’ + ( w.screen.height < 970 ? w.screen.height : 970))
Skuid reference Fields:
model: SelectedAccountContacts (Name, Email, Id)
Any thoughts??
Are you running this from a Table Row Action, or a Page Title button?
Regardless of how you run it you’ll need to do the following:
1. Go to the JavaScript menu in the Composer (next to Models and Components), and click the + icon to add a new JavaScript Resource.
2. Set Resource Location to “Inline (Snippet)”
3. Set Resource Name to “ToutAppForContact”.
4. Click the icon to edit the Resource Body, and paste in the following:
var params = arguments=0],<br> model = params.model,<br> row = params.item ? params.item.row : params.row;<br>var u = skuid.utils.mergeAsTextInContext(<br> "https://www.toutapp.com/pitches/new?name={{{Name}}}&email={{{Email}}}&salesforce_contact_id={{{Id}}}&force_bookmarklet=true&style=salesforce", <br> { model: model, row: row }<br>);<br>var w = window;<br>w.open(u,'Tout','scrollbars=1,status=1,width=762,height=' + ( w.screen.height < 970 ? w.screen.height : 970));
From either your Row Action or Page Title button, set your Action Type to Custom / Run a Snippet, and for “Snippet Name”, enter “ToutAppForContact”
I am running this using a Table Row Action. But everything worked perfectly! Thank you so much for your help!
Yay! Great to hear.
Hey Megan
We’re integrating Tout right now as well and that quick email row action is awesome! Where did you find the URL to launch that? I’d like to get the same thing working for calls as well.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.