ToutApp Javascript button in Skuid

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>&nbsp; &nbsp; &nbsp;model = params.model,<br>&nbsp; &nbsp; &nbsp;row = params.item ? params.item.row : params.row;<br>var u = skuid.utils.mergeAsTextInContext(<br>&nbsp; &nbsp;"https://www.toutapp.com/pitches/new?name={{{Name}}}&amp;email={{{Email}}}&amp;salesforce_contact_id={{{Id}}}&amp;force_bookmarklet=true&amp;style=salesforce", <br>&nbsp; &nbsp;{ model: model, row: row }<br>);<br>var w = window;<br>w.open(u,'Tout','scrollbars=1,status=1,width=762,height=' + ( w.screen.height &lt; 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.