Skip to content

Instantly share code, notes, and snippets.

@mshanemc
Created July 7, 2017 14:55
Show Gist options
  • Save mshanemc/864d80600caff33903c0c12bdfe6e712 to your computer and use it in GitHub Desktop.
Save mshanemc/864d80600caff33903c0c12bdfe6e712 to your computer and use it in GitHub Desktop.
anythingpath in classic service cloud console
<apex:page standardController="Case" standardStylesheets="false" cache="false" showHeader="false" doctype="html-5.0">
<apex:includeLightning />
<apex:stylesheet value="/resource/anythingSLDS201/assets/styles/salesforce-lightning-design-system.css" />
<div id="lightning"/>
<script>
$Lightning.use("c:ServiceCasePath", function() {
$Lightning.createComponent("c:AnythingPath", {
recordId : "{!$CurrentPage.parameters.Id}",
sObjectName : "Case",
pathField : "Status"
}, "lightning", function(cmp) {});
$Lightning.createComponent("c:GuidanceBox", {
recordId : "{!$CurrentPage.parameters.Id}",
sObjectName : "Case",
field : "Status",
useRecordTypes : false
}, "lightning", function(cmp) {});
});
</script>
</apex:page>
<aura:application extends="ltng:ServiceCasePath" >
</aura:application>
Click on developer Console. Once it loads, click File, New, then Lightning Application. Copy the code below (outApp) and save (just the Aura tag) as CaseStatusPath (you'll use that name later).
Once that is done. Create a new visualforce page called CasePathGuidance. (Setup>Develop>Visualforce Pages) Click New and give it a name like CasePathGuidance
Copy and paste the below (casePathGuidance):
Note--slds now has its own apex tag, https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_slds.htm which is better than using static resources that you have to maintain when new versions come out.
Save. Then in your console add this page to your highlights panel, and life is good. If you need This to work for any other object, just replace where you see 'case' with the Object API name ie: Project__c, or Account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment