Skip to content
This repository has been archived by the owner on Jan 25, 2025. It is now read-only.

Commit

Permalink
Merge pull request #83 from SalesforceFoundation/feature/xinnanli/inc…
Browse files Browse the repository at this point in the history
…identLayout

Update Case Incident Layout -- Note that the "System Default" Compact Layout has all the requested fields displayed, so we are not creating the K12 incident Case Compact Layout at this time.
  • Loading branch information
dgamboni authored Oct 21, 2019
2 parents edd9175 + 2d42e45 commit 4ff37be
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 0 deletions.
155 changes: 155 additions & 0 deletions src/layouts/Case-K12 Kit Incident Layout.layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
<excludeButtons>Submit</excludeButtons>
<layoutSections>
<customLabel>true</customLabel>
<detailHeading>false</detailHeading>
<editHeading>false</editHeading>
<label>Fields</label>
<layoutColumns>
<layoutItems>
<behavior>Edit</behavior>
<field>ContactId</field>
</layoutItems>
<layoutItems>
<behavior>Required</behavior>
<field>hed__Category__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Subject</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Description</field>
</layoutItems>
<layoutItems>
<behavior>Required</behavior>
<field>hed__Occurrence_Date__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>hed__Location__c</field>
</layoutItems>
</layoutColumns>
<layoutColumns>
<layoutItems>
<behavior>Edit</behavior>
<field>OwnerId</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>AccountId</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Priority</field>
</layoutItems>
<layoutItems>
<behavior>Required</behavior>
<field>Status</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Origin</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>SuppliedEmail</field>
</layoutItems>
</layoutColumns>
<style>TwoColumnsLeftToRight</style>
</layoutSections>
<layoutSections>
<customLabel>true</customLabel>
<detailHeading>true</detailHeading>
<editHeading>false</editHeading>
<label>Custom Links</label>
<layoutColumns/>
<layoutColumns/>
<layoutColumns/>
<style>CustomLinks</style>
</layoutSections>
<platformActionList>
<actionListContext>Record</actionListContext>
<platformActionListItems>
<actionName>NewTask</actionName>
<actionType>QuickAction</actionType>
<sortOrder>2</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>NewCase</actionName>
<actionType>QuickAction</actionType>
<sortOrder>3</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>PrintableView</actionName>
<actionType>StandardButton</actionType>
<sortOrder>4</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>ChangeRecordType</actionName>
<actionType>StandardButton</actionType>
<sortOrder>5</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>ChangeOwnerOne</actionName>
<actionType>StandardButton</actionType>
<sortOrder>6</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Clone</actionName>
<actionType>StandardButton</actionType>
<sortOrder>7</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Delete</actionName>
<actionType>StandardButton</actionType>
<sortOrder>8</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>Edit</actionName>
<actionType>StandardButton</actionType>
<sortOrder>0</sortOrder>
</platformActionListItems>
<platformActionListItems>
<actionName>NewNote</actionName>
<actionType>QuickAction</actionType>
<sortOrder>1</sortOrder>
</platformActionListItems>
</platformActionList>
<relatedContent>
<relatedContentItems>
<layoutItem>
<behavior>Readonly</behavior>
<field>ContactId</field>
</layoutItem>
</relatedContentItems>
<relatedContentItems>
<layoutItem>
<behavior>Readonly</behavior>
<field>AccountId</field>
</layoutItem>
</relatedContentItems>
</relatedContent>
<relatedLists>
<fields>NAME</fields>
<fields>hed__Contact__c</fields>
<fields>hed__Role__c</fields>
<relatedList>hed__Behavior_Involvement__c.hed__Case__c</relatedList>
</relatedLists>
<relatedObjects>ContactId</relatedObjects>
<relatedObjects>AccountId</relatedObjects>
<showEmailCheckbox>false</showEmailCheckbox>
<showHighlightsPanel>false</showHighlightsPanel>
<showInteractionLogPanel>false</showInteractionLogPanel>
<showKnowledgeComponent>false</showKnowledgeComponent>
<showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
<showSubmitAndAttachButton>true</showSubmitAndAttachButton>
<summaryLayout>
<masterLabel>00hS0000000ZPG2</masterLabel>
<sizeX>4</sizeX>
<sizeY>0</sizeY>
<summaryLayoutStyle>Default</summaryLayoutStyle>
</summaryLayout>
</Layout>
1 change: 1 addition & 0 deletions src/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<members>Account-K12 Kit Household Layout</members>
<members>Account-K12 Kit Organization Layout</members>
<members>Account-K12 Kit Sports Organization Layout</members>
<members>Case-K12 Kit Incident Layout</members>
<members>Contact-K12 Kit Faculty Staff Layout</members>
<members>Contact-K12 Kit Guardian Layout</members>
<members>Contact-K12 Kit Student Layout</members>
Expand Down
5 changes: 5 additions & 0 deletions tasks/salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ def _process_metadata(self):
'false',
)

# Set record type visibilities for Case
self._set_record_type(
"Case.{namespaced_org}Incident".format(**namespace_args), "true"
)

def _set_record_type(self, name, default):
rt = rt_visibility_template.format(default, name)
findReplace(
Expand Down
4 changes: 4 additions & 0 deletions unpackaged/config/trial/profiles/Admin.profile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<layout>Account-%%%NAMESPACE%%%K12 Kit Sports Organization Layout</layout>
<recordType>Account.Sports_Organization</recordType>
</layoutAssignments>
<layoutAssignments>
<layout>Case-%%%NAMESPACE%%%K12 Kit Incident Layout</layout>
<recordType>Case.%%%NAMESPACED_ORG%%%Incident</recordType>
</layoutAssignments>
<layoutAssignments>
<layout>Contact-%%%NAMESPACE%%%K12 Kit Faculty Staff Layout</layout>
<recordType>Contact.%%%NAMESPACED_ORG%%%Faculty</recordType>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
<flexiPageRegions>
<componentInstances>
<componentInstanceProperties>
<name>collapsed</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>hideChatterActions</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>numVisibleActions</name>
<value>3</value>
</componentInstanceProperties>
<componentName>force:highlightsPanel</componentName>
</componentInstances>
<mode>Replace</mode>
<name>header</name>
<type>Region</type>
</flexiPageRegions>
<flexiPageRegions>
<componentInstances>
<componentName>forceChatter:recordFeedContainer</componentName>
</componentInstances>
<name>Facet-eca4c8a2-00c4-4a9c-b4a9-edd7d830f644</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<componentInstances>
<componentInstanceProperties>
<name>body</name>
<value>Facet-eca4c8a2-00c4-4a9c-b4a9-edd7d830f644</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>title</name>
<value>Standard.Tab.feed</value>
</componentInstanceProperties>
<componentName>flexipage:tab</componentName>
</componentInstances>
<name>Facet-a584bd13-76d9-4cc1-bf08-8c5df89d5c1b</name>
<type>Facet</type>
</flexiPageRegions>
<flexiPageRegions>
<componentInstances>
<componentName>force:detailPanel</componentName>
</componentInstances>
<componentInstances>
<componentInstanceProperties>
<name>tabs</name>
<value>Facet-a584bd13-76d9-4cc1-bf08-8c5df89d5c1b</value>
</componentInstanceProperties>
<componentName>flexipage:tabset</componentName>
</componentInstances>
<mode>Replace</mode>
<name>main</name>
<type>Region</type>
</flexiPageRegions>
<flexiPageRegions>
<componentInstances>
<componentInstanceProperties>
<name>relatedListComponentOverride</name>
<value>NONE</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>rowsToDisplay</name>
<value>10</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showActionBar</name>
<value>true</value>
</componentInstanceProperties>
<componentName>force:relatedListContainer</componentName>
</componentInstances>
<mode>Replace</mode>
<name>sidebar</name>
<type>Region</type>
</flexiPageRegions>
<masterLabel>K12 Case Record Page</masterLabel>
<parentFlexiPage>sfa__Case_rec_L</parentFlexiPage>
<sobjectType>Case</sobjectType>
<template>
<name>flexipage:recordHomeTemplateDesktop</name>
</template>
<type>RecordPage</type>
</FlexiPage>
11 changes: 11 additions & 0 deletions unpackaged/post/config/objects/Case.object
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>K12_Case_Incident_Record_Page</content>
<formFactor>Large</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
</actionOverrides>
</CustomObject>

0 comments on commit 4ff37be

Please sign in to comment.