Salesforce Create Buttons and Links option - Custom URL to launch email template - url

I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great

I don't know if this is documented anywhere by salesforce, but I found from some guess work:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn
Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.
The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)

This was really helpful. I did, however, figure out another way to do it. Click on the "Send an Email" button you currently have. Copy the URL and add &template_id=YOUR TEMPLATE ID.
There is one other ID number that will show up in the original URL. Change that to be the dynamic field you want it to be.
For example:
Copy url from "Send Email": https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1
Add &template_id=YOUR TEMPLATE ID so it looks like this:
/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID
Remove the other id (it's the object you used to send the email - so in this case, I was wanting to be able to send an email directly from a Campaign) and replace with the dynamic field:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID
And voila! It should work!

Abeyer's answer is good. However, if the template contains solution attachments "{!Case.Solution_Attachments}" the attachments will not get included unless you add the new_template=1 parameter to the URL making it:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1

Related

Build URL Using GA Attributes

Good Day All
I am completely new to this type of query but is it possible to define a url on a button click on a page that populates the/a URL with information form the Google Tag stack? e.g. Campaign, Source etc?
Sorry for the vague question.
Here are the two method that you can use to create a GA Attributes tagged url
https://support.google.com/analytics/answer/1033867?hl=en
&
http://www.utm.io/

create multiple 'view in app' links using Branch.io in index view

I'd like to create an index view which shows a list of items followed by a 'view in app' button to download data directly into the app.
Solution 1. [Not a sulution] I think deepviewcta call is appropriated to use in a single product page. It doesn't look like suitable in my case, because it has to call deepview before calling deepviewcta.
Solution 2. I'm trying to construct the URL directly using 'dynamic' deeplink. The documentation says any additional query param appended will shows up in the initSession callback, but it doesn't work for me.
the construct link looks like this:
https://bnc.lt/a/key_test_kkkkkkkkkkkkkkkkkkkkkkk?has_app=yes&channel=character&my_list_id=0c56c4bc-fac9-412a-be19-c0feefe30d29
what I got in the callback only has following data
"+clicked_branch_link" = 0;
"+is_first_session" = 0;
in the callback, other params are just missing, I got:
url NSURL * #"my-app://open?link_click_id=197576253652400385" 0x00007fad90d47450
Any Other Solutions?
It turns out I was using live key in ios App while using test key in server end. So solution 2 works now.
Also for anyone want to do the same thing. For regular Branch Links, it is not possible to stay on the same page as the Branch link was clicked from. they suggest adding a $after_click_url to the Link's data. This key will tell the system to route to a particular web address after the Branch Link has been clicked.
Thanks for branch.io's support, they responded very quickly.

Asana * Wufoo : Advanced integration

I am working on "Advanced integration" of a forms from Wufoo to Asana. SO far I have followed the Asana guide - https://asana.com/guide/help/api/wufoo
Guide is excellent and everything within the guide work as it says, but I need to go a bit further.
I notice that there is a bit of symbols that asana recognize from the forms( like quotes"" , equal ==, question mark ?), example of multiple choice menu:
"Chose person" == "asana tag" ? 1559453678421
"Chose person" == "asana person" ? blablabla#something.org
So in the following example I can have a multi choice menu that can assign task to a person and/or put a tag.
If I add a second person, that person become a follower, which is great.
My goal:
I want to make the form filler to add its email address, and that email address to be add as follower of the task.
What I know:
I have so far talked with Wufoo support and they told me that the text from the form goes in a straight text form to Asana, and asana actually recognize the form and create the specific tasks, for example:
<strong>This become BOLD text in asana</strong>
I keep on looking for the rest of the recognized symbols, but without success so far. If you have any kind of information regarding the "Advanced integration" I would love to know.
(I work at Asana.) Right now we only support routing through fields that are hidden (have the "hide" classname) with our Wufoo integration, but your use-case is very interesting. I'll take a look and see if we can enable this.
I have found a 2 workarounds to make this work for me.
Workaround 1
So far I have discover that asana recognize "hide" CSS Layout and the field labels : project,tag,assignee,follower . If these values are true then to make this editable I add a Wufoo form Rule that can show/hide fields. for example :
If "Email" contains "#" show "assignee"
And that rule does not change the CSS Layout Keyword "hide" so the form is send the same way with the only difference that the "hide" field is actually visible and that make it easily editable.
Workaround 2
By keeping the fields hide you can still edit them with "URL Modifications ". So basically have 2 forms linked together, so the first form fill up information that is send to the second form within the URL, so the fields remain hidden but being filled up by the URL. - I have not played with that much but Wufoo support briefly explain to me that its possible
URL Modification reference - http://help.wufoo.com/articles/en_US/SurveyMonkeyArticleType/URL-Modifications

Trying to pass an argument/variable into an attribute in Rails

Imagine I have two models for a Greeting Card App: Template and Card. In creating a Card you specify the target's name, age, and which template you want to use (Card belongs_to template). The Template just has say title and body:text attributes.
I would obviously like there to be a placeholder for the target's name (and perhaps age) within the template body, because I want anyone to be able to create a Card, select the template, and see a Card with the chosen template using their target's name. Is there a way to pass in an argument to the body of the Template for the target's name? I have the Card and target info waiting in the controller but I don't know how to pass it the info since in creating the Template the body was typed into a form and is hard coded into the db as an attribute.
The only way around this I see would be to create a view for each Template instead of storing them in the database, or to create several 'chunks' of the template body, and insert the target's name in between. I'd like to figure this out the more efficient way. Thanks in advance!
If you did not want to do this as templates and truly want it store in the db then I would use javascript to replace keys embedded into the text.
This would also offload the search and replace to the client.
I found the easiest way to go about this ended up just using a designated keyword in the attribute and then replacing it in the controller using the ruby method .gsub!

symfony 1.4: two questions about sfDoctrineApplyPlugin (well, could be also considered as general questions)

I have found in sfDoctrineApplyPlugin a template called applyAfter.php
that shows a message like "You have registered ok..." after the users apply for an account. It is called from the sfApply/apply action this way: "return 'After';" when the apply form is valid.
What kind of template is that? I never saw that way (return 'After';) of calling a template. Can someone give me info about that?
Second question: I show a layout with a language select when the the
apply form is printed. I wouldn't like to show that language select in
the page that shows the message "You have registered ok...". As the action
is the same in the both pages (sfApply/apply), what should i do to hide
the language select in the verification page?
Javi
The function returns the string 'After' to the caller. The caller always seems to be as follows: $this->widgetSchema->setNameFormat('sfApplyResetRequest[%s]');
So, the string 'After' is being used in conjunction with the setNameFormat function (which is part of the symfony libraries). All it is doing, is setting the 'name' attribute for the form. More information on this function here.
For your second question, you could simply add an IF statement, to check to see if the current route is the one that you do not want to display the language select on. If it isn't, then display the language select.
You can verify the current route with the following code:
sfContext::getInstance()->getRouting()->getCurrentRouteName();

Resources