Create button in VF Email Template to Reopen Cases - salesforce

I'm trying to create an email template to send to the user when his case is closed. In this email there will be a button and if the user clicks on it the case will be reopen. Is there a way to do this? If not, are there any other ways to make the user able to reopen cases via email? Thnx
<messaging:emailTemplate recipientType="Contact"
relatedToType="Case"
subject="Olá! Seu caso {!relatedto.CaseNumber} foi resolvido." >
<messaging:htmlEmailBody >
<html>
<body>
<p>{!recipient.name},</p>
<p>Estamos passando pra dizer que o caso {!relatedto.CaseNumber}, aberto em {!relatedto.CreatedDate}, foi resolvido. Caso
não concorde com a solução, por favor clique no link abaixo. </p>
</body>
<button> Yes, I accept the solution </button>
<button> No, I would like to decline the solution </button>
</html>
<apex:includeScript/>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

Do you have a community? If they could log in to community (partner or customer) and view their cases it'd be easy to provide link to the record, they log in and can click button to reopen or something.
If not - you could for example make a Visualforce page, expose it as Site, even to unauthenticated (guest) users. If you'd pass the case id in the URL you could look the record up and reopen. Normally in VF page apex controller you aren't allowed to do DML operations like update so you'd still need a button or cheat with <apex:page action=...> attribute. Using action is against security best practices, see https://salesforce.stackexchange.com/a/28853/799. It'd also be good idea to not have just the case id in the url (hackers?), maybe demand that the url contains also the contact's email, account number or something else you can validate against Case.
You could also try building mailto links in your email. If they'd pointo your email-to-case (standard or with custom email handler) you could use that to reopen? If you go with custom email handler here are some examples and this might help too

Related

Salesforce Email Template Merge Fields for Related Object

I have a custom OBject (CusObj__c) which having 2 lookup fields(Author and Modifier) with users Module. I am having a requirement that when record will get created in CusObj__c, an email should get trigger and email content should show email address of the Auther and Modifier.
I am trying the below code but its is not working
{!CusObj__c.Author__r.Email}
{!CusObj__c.Modifier__r.Email}
Please suggest
As Abraham suggested - you could make a formula field for that on your object. It's bit wasteful if it's just for one email...
Or you could try making a Visualforce email template. It'll let you go "up" the relation up to 5 times.
Something like this?
<messaging:emailTemplate recipientType="User" relatedToType="CusObj__c" subject="hi stackoverflow">
<messaging:htmlEmailBody>
<html>
<body>
<p>Dear {!recipient.name},</p>
<p>Here's your stuff: {!relatedTo.Modifier__r.Email}</p>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

use angularjs ui-router to implement a summary page

My web-app is written by AngularJs+ ui-router.
The web-app contains many forms (the number of forms are vary, depending on the application the user is applying). Each form has a ui-route state, so our users can go to each form and fill the information.
Before users submit the application we would like to implement a "summary/review" state(page) that contains all the forms the user filled, so users can review (and print) all the information from one page. Is there any way I can use the same form template (templateUrl) for the summary page?
I was thinking to use ng-include and programmatically(ng-repeat) list out all the selected forms, but it seems doesn't work.
PS: my form template might use different controller..
OK, I figured this out.
For ng-include: we need to use
<ng-include src="'formPath'"></ng-include>
For putting the ng-include in a repeater:
<div ng-repeat="f in vm.thisApp.RequiredForms">
<ng-include src="f.FormPath"></ng-include>
</div>
I hope this helps anyone who needs the answer.

window.ATL_JQ_PAGE_PROPS in JQgrid

I want to popup a Jira request popup, on click of an icon. This icon's css class is created in the JQ grid, in the column model. On the click of this icon, I need to open a Jira request popup.
can someone shed some light to achieve this.
EDIT - If you are talking about adding a JIRA issue collector to your own site, then this may help:
Step 1: Create an issue collector within Jira. Its a straight forward process and you can find the steps here or follow these steps:
Login to Jira
Choose > Projects.
On the left of the Project Summary page, click the Issue Collectors tab. The Issue Collectors page is displayed, listing any issue collectors that have already been set up in your project.
Click the Add Issue Collector button to open the Add Issue Collector page.
In the top section of the Add Issue Collector page, fill in the fields provided (name, description, issue type, issue reporter, match reporter, collector browser info)
In the middle section of the Add Issue Collector page (entitled 'Trigger'), specify the "Trigger text" and "Trigger style".
In the lower section of the Add Issue Collector page (entitled 'Issue Collector Form'), specify the "Template" and "Message".
Click the Submit button to save your changes.
After clicking the Submit button to save your new issue collector, a page containing code snippets is displayed. Use the code and information provided to embed your new issue collector into your web site. This is what the snippets looks like
<script type="text/javascript" src="https://your_jira_url.co.za/s/a08716ba9b893434c0030633c043df94-T/asfxnf/74002/32f7d0e4f4445b0f89b4b03188c6e1bf/2.0.23/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=*****"></script>
Step 2: Embed code snippet to your site (Add the below code to the html page you want the Jira popup to appear on)
<!-- This is the script for the issue collector feedback form -->
<PASTE CODE SNIPPET HERE>
<!-- This is the script for specifying the custom trigger. -->
<script type="text/javascript">
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
//Requries that jQuery is available!
jQuery("#feedback-button").click(function(e) {
e.preventDefault();
showCollectorDialog();
});
}
};
</script>
 
Step 3: Add a trigger to call up the collector popup (same html page as above)
<a href="#" id="feedback-button" class='btn btn-primary btn-large'>Report feedback</a>
When you click the button, your Jira popup will appear.
Reference:
https://confluence.atlassian.com/adminjiraserver071/advanced-use-of-the-jira-issue-collector-802592648.html

How do I pass data with my MEAN app? From a page of products to a new page with details about the specific product that the user clicked on?

I am a newbie at the MEAN stack. I have a full app working and have searched extensively on how to solve the following problem but I'm realizing that I don't know how to "ask" the question to be sent to the proper resource.
I have a marketplace. In the dashboard, a user can enter details about their product (a boat) and it is sent to the DB. In my marketplace, I'm retrieving all of the boats from the DB and theyre styled and listed on the page.
I want a user to click on one of the tiles components that I have created with an ng-list (boat) and be sent to a new page with a fully-expanded view of that specific boat. (larger pictures, expanded details, etc.) basically all the details about the product that won't fit in the minimalistic tile component in the marketplace.
How do I pass data about that specific boat that the user clicks on and be sent to a new page? Is this an ng-directive? an API/route thing?
I just am unsure how to reference the specific boat from the list i'm retrieving and have the user sent to a new details page. Any direction or resources that will teach me to solve this problem?
In general, use ng-repeat to display a list of products and ng-click to handle clicks.
<a ng-repeat="product in productList" ng-click="goto($index)">
<h2> {{product.title}}</h2>
<img ng-src="{{product.picture}}">
<p>{{product.description}}</p>
</a>
JS
$scope.goto = function(index) {
$location(productList[index].location);
});
Use a router such as ngRoute or ui-route to intercept the new location and load the appropriate template and controller.

How does Google+ contact process glass shared timeline items?

I am testing out the mirror api and so far I have a sample app running nicely.
The issue I am having is that I added a menu item for the action 'SHARE' but when I try to share the timeline card created by my app to Google+ it posts an empty Google+ post. The only text in the Google+ post is #throughglass. The contents of the timeline card is some simple html (see below) which renders find on glass. I also set the speakable text which works great with the 'READ_ALOUD' menu action. What gives on the 'SHARE' action, am I missing something?
Link to Google+ post
Timeline Item html:
<article class="auto-paginate">
<section>
<p class="text-auto-size">
Hello Word.
</p>
</section>
</article>
Each application is free to choose what, from the shared timeline item, it will use as part of the share command. The Google+ Glassware appears to use the text field only when sharing a textual item and ignores the html field.
(This makes some sense. Google+ can't display the HTML formatting, so it chooses to go with the text that it knows should be good.)
When you're writing Glassware, you should make sure both the text and html (and speakableText, for that matter) fields contain the correct representation of your item.

Resources