• turbobuick
  • NEWBIE
  • 15 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies

Hi All - so we're looking at possibly rolling out a custom email publisher for use on the CaseFeed that would leverage the <apex:emailPublisher> functionality.

 

In conjunction with that, I'm trying to create an Apex class to use for Email Template selection and enable it for the Enable default email templates feature located in Support Settings. I've referenced the documentation and nearly copied the example code provided here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_email_template_selector_example.htm but I'm receiving the following error in Eclipse for my code: Save error: Invalid type: Support.EmailTemplateSelector

 

Here's my code - what am I missing?

 

global class CaseEmailTemplateSelector implements Support.EmailTemplateSelector {
	
	// Empty constructor
	global CaseEmailTemplateSelector() {  }
	
	global ID getDefaultEmailTemplateId(ID caseId) {
		// Get the current Case
		Case c = [SELECT Id, Subject FROM Case WHERE Id = :c.Id];
	
	EmailTemplate et;
	
		// For Support Record Type, use the Support Case Response email template
		if(c.RecordTypeId == System.Label.Case_Support_Record_Type_ID) {
			et = [SELECT Id 
					FROM EmailTemplate 
					WHERE DeveloperName = 'Support_Rep_Case_Response_Shell_HTML'];
		}
		
		return et.id;
	
	}

}

 

 

Hey all - 

 

I've searched google and the dev boards for a solution to this, but I'm struggling to figure out what is wrong with my visualforce code to open a subtab within the Service Cloud console. I've built a VisualForce table (apex:pageBlockTable) that displays a list of Cases and I'd like the "Case Number" column to be a link that opens that particular Case in a subtab. Anytime I try to click the hyperlink, it loads a 'URL No Longer Exists' error within the same frame (no subtab is opened). I'm trying to call the javascript subtab function as an onClick within the apex:outputlink tag - is this even possible?

 

Here's my current code - any help would be greatly appreciated!

 

<apex:page standardController="Case" extensions="CaseRecentCasesController">
    <apex:form >
    <apex:includeScript value="/support/console/22.0/integration.js"/>
    	<script type="text/javascript">
    		function parentTab() {
				//Get the ID of the primary tab
				sforce.console.getEnclosingPrimaryTabId(openSubtab);
				}
				
				var openSubtab = function openSubtab(result) {
					//Open subtab in primary tab
					var primaryTabId = result.id;
					sforce.console.openSubtab(primaryTabId, '/' + {!Case.id}, false, {!Case.CaseNumber});
					};
    	</script>
    <apex:inputHidden value="{!Case.Customer_Subscription__c}"/>
        <apex:pageBlock mode="maindetail">
            <apex:pageMessage escape="false" severity="info" strength="2" summary="The 10 most recent Cases are displayed for {!Case.Customer_Subscription__r.Name}." rendered="{!NOT(Case.Customer_Subscription__c = '')}"/>
            <apex:pageMessage severity="info" strength="2" summary="There are no recent Cases to display because a Customer Subscription is not associated with this Case. Please set one if applicable."  rendered="{!Case.Customer_Subscription__c = ''}" /> 
            <apex:outputPanel layout="block" style="overflow:auto; height:550px"  rendered="{!NOT(Case.Customer_Subscription__c = '')}">
                <apex:pageBlockTable value="{!RelatedCases}" var="rCase" style="overflow:auto">

                    <apex:column headerValue="Case Number">
                        <apex:outputlink onClick="openCaseSubtab()">{!rCase.CaseNumber}</apex:outputlink>
                    </apex:column>
                    <apex:column value="{!rCase.Subject}"/>
                    <apex:column value="{!rCase.Status}"/>
                    <apex:column value="{!rCase.Owner.Name}" headerValue="Case Owner"/>
                    <apex:column value="{!rCase.CreatedDate}"/>
                </apex:pageBlockTable>
                <br />
                <apex:outputlink target="_blank" value="/500?rlid=00N70000002JlrX&id={!Case.Customer_Subscription__r.Id}">View all Cases</apex:outputlink>
            </apex:outputPanel>
        </apex:pageBlock>
    </apex:form>


</apex:page>

 

Hi All,

 

I'm very (very) new to Apex code development but am trying to accomplish a simple task. I have a custom button that points to a VisualForce where I intend to call a short code through a controller. I need the block of code to take a simple action: update the record owner Id (on the Account object) to the current user's ID who has just clicked the button. Simply, this button allows someone to 'claim' an Account. 

 

Any help at all would be greatly appreciated - I'm failing miserably at writing the code!

 

Thx.

Hi All - so we're looking at possibly rolling out a custom email publisher for use on the CaseFeed that would leverage the <apex:emailPublisher> functionality.

 

In conjunction with that, I'm trying to create an Apex class to use for Email Template selection and enable it for the Enable default email templates feature located in Support Settings. I've referenced the documentation and nearly copied the example code provided here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_email_template_selector_example.htm but I'm receiving the following error in Eclipse for my code: Save error: Invalid type: Support.EmailTemplateSelector

 

Here's my code - what am I missing?

 

global class CaseEmailTemplateSelector implements Support.EmailTemplateSelector {
	
	// Empty constructor
	global CaseEmailTemplateSelector() {  }
	
	global ID getDefaultEmailTemplateId(ID caseId) {
		// Get the current Case
		Case c = [SELECT Id, Subject FROM Case WHERE Id = :c.Id];
	
	EmailTemplate et;
	
		// For Support Record Type, use the Support Case Response email template
		if(c.RecordTypeId == System.Label.Case_Support_Record_Type_ID) {
			et = [SELECT Id 
					FROM EmailTemplate 
					WHERE DeveloperName = 'Support_Rep_Case_Response_Shell_HTML'];
		}
		
		return et.id;
	
	}

}

 

 

Hey all - 

 

I've searched google and the dev boards for a solution to this, but I'm struggling to figure out what is wrong with my visualforce code to open a subtab within the Service Cloud console. I've built a VisualForce table (apex:pageBlockTable) that displays a list of Cases and I'd like the "Case Number" column to be a link that opens that particular Case in a subtab. Anytime I try to click the hyperlink, it loads a 'URL No Longer Exists' error within the same frame (no subtab is opened). I'm trying to call the javascript subtab function as an onClick within the apex:outputlink tag - is this even possible?

 

Here's my current code - any help would be greatly appreciated!

 

<apex:page standardController="Case" extensions="CaseRecentCasesController">
    <apex:form >
    <apex:includeScript value="/support/console/22.0/integration.js"/>
    	<script type="text/javascript">
    		function parentTab() {
				//Get the ID of the primary tab
				sforce.console.getEnclosingPrimaryTabId(openSubtab);
				}
				
				var openSubtab = function openSubtab(result) {
					//Open subtab in primary tab
					var primaryTabId = result.id;
					sforce.console.openSubtab(primaryTabId, '/' + {!Case.id}, false, {!Case.CaseNumber});
					};
    	</script>
    <apex:inputHidden value="{!Case.Customer_Subscription__c}"/>
        <apex:pageBlock mode="maindetail">
            <apex:pageMessage escape="false" severity="info" strength="2" summary="The 10 most recent Cases are displayed for {!Case.Customer_Subscription__r.Name}." rendered="{!NOT(Case.Customer_Subscription__c = '')}"/>
            <apex:pageMessage severity="info" strength="2" summary="There are no recent Cases to display because a Customer Subscription is not associated with this Case. Please set one if applicable."  rendered="{!Case.Customer_Subscription__c = ''}" /> 
            <apex:outputPanel layout="block" style="overflow:auto; height:550px"  rendered="{!NOT(Case.Customer_Subscription__c = '')}">
                <apex:pageBlockTable value="{!RelatedCases}" var="rCase" style="overflow:auto">

                    <apex:column headerValue="Case Number">
                        <apex:outputlink onClick="openCaseSubtab()">{!rCase.CaseNumber}</apex:outputlink>
                    </apex:column>
                    <apex:column value="{!rCase.Subject}"/>
                    <apex:column value="{!rCase.Status}"/>
                    <apex:column value="{!rCase.Owner.Name}" headerValue="Case Owner"/>
                    <apex:column value="{!rCase.CreatedDate}"/>
                </apex:pageBlockTable>
                <br />
                <apex:outputlink target="_blank" value="/500?rlid=00N70000002JlrX&id={!Case.Customer_Subscription__r.Id}">View all Cases</apex:outputlink>
            </apex:outputPanel>
        </apex:pageBlock>
    </apex:form>


</apex:page>

 

Hi All,

 

Any advice appreciated - seem to be between a rock and a hard place!

 

I need to be able to control the email template a support user defaults to when they want to create an email via case feed action.  

 

If I use the smart templates feature it only works with the standard mail action, which defaults From to the user's personal address (Yikes!) rather than a 'support@' email address.  

If I use a custom emailpublisher component in a custom action, then I can set the From to whatever I want, but cannot set an email template to use.

 

Any suggestions out there? Seems bizarre we cant control From address and email template to use...

 

 

 

 

Hi All,

 

I'm very (very) new to Apex code development but am trying to accomplish a simple task. I have a custom button that points to a VisualForce where I intend to call a short code through a controller. I need the block of code to take a simple action: update the record owner Id (on the Account object) to the current user's ID who has just clicked the button. Simply, this button allows someone to 'claim' an Account. 

 

Any help at all would be greatly appreciated - I'm failing miserably at writing the code!

 

Thx.