You need to sign in to do that
Don't have an account?
MATTYBME
VF New Case on Submit does not send to Suggested Solutions
So what I failed to take into account was the fact that normally on Case Submission (on Customer Portal with the Enable Suggested Solutions on Case Submission checkbox enabled on Portal Settings) if there was a Solution that was applicable to the Case it would send the user to a page where they could view the suggested Solutions and drill into the specific Solution and Close their own Case if the Solution resolved the Case by selecting Yes the Solution was Helpful. This would close the Case.
Obviously I missed this component in building the new Case pages in Visualforce and am not sure how to include it using VF.
VF New case code looks like this:
And the URL for a Case submitted using the standard New Case page that suggests a Solution is this:
https://na6.salesforce.com/ui/solution/SolutionSuggestionPage—caseid=50080000005v4nB&autoredirected=1
How do I build into my VF page the right code to make sure that those Cases submitted where there maybe a relevant Solution that the page redirects through to the Suggested Solutions page?
Message Edited by MATTYBME on 01-07-2009 02:28 PM
Obviously I missed this component in building the new Case pages in Visualforce and am not sure how to include it using VF.
VF New case code looks like this:
Code:
<apex:page standardController="case" tabstyle="trouble_tickets__tab">
<apex:sectionHeader title="Trouble Tickets" subtitle="New Trouble Ticket"/>
<apex:form >
<apex:pageBlock title="New Trouble Ticket">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Submit" />
<apex:commandButton action="/p/attach/NoteAttach—pid=50080000005ulLn&retURL=%2Fui%2Fsolution%2FSolutionSuggestionPage%3Fcaseid%3D50080000005ulLn%26autoredirected%3D1" value="Submit & Add Attachment" />
<apex:commandButton action="/apex/CustomerPortalCaseHomePage" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Trouble Ticket Details" columns="1">
<apex:inputField value="{!case.priority}" />
<apex:outputField value="{!case.status}">
<apex:outputText ><font style="color:red">New</font></apex:outputText>
</apex:outputField>
<apex:inputField value="{!case.subject}" style="width: 400px;"/>
<apex:inputField value="{!case.description}" style="width: 700px; height: 100px;"/>
<apex:outputField value="{!case.Resolution__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockSection >
<c:CaseQuickTipsGuideComponent />
<c:CaseAttachmentsInstructions />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
And the URL for a Case submitted using the standard New Case page that suggests a Solution is this:
https://na6.salesforce.com/ui/solution/SolutionSuggestionPage—caseid=50080000005v4nB&autoredirected=1
How do I build into my VF page the right code to make sure that those Cases submitted where there maybe a relevant Solution that the page redirects through to the Suggested Solutions page?
Message Edited by MATTYBME on 01-07-2009 02:28 PM
create an apex class with the save action that overrides the default action (reference it with <apex:page extensions="solutionPageControllerExtension">).
public class solutionPageControllerExtension {
public solutionPageControllerExtension (ApexPages.StandardController controller){
}
public PageReference save() {
insert case;
PageReference solutionPage = new PageReference('/ui/solution/SolutionSuggestionPage—caseid=' + case.Id + 'autoredirected=1');
solutionPage.setRedirect(true);
return solutionPage;
}
}
(... still havn't figured out how to disable those smileys)
Message Edited by MATTYBME on 01-08-2009 11:27 AM