Skip to content

Commit 3df9487

Browse files
authoredMar 20, 2025··
Merge pull request #378 from navikt/EmpCourseRecPg
Flows to handle record type for task related to course
2 parents 418be5d + 060982d commit 3df9487

8 files changed

+764
-3
lines changed
 

‎bin/install-scratch2.sh

+212
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
#!/bin/bash
2+
3+
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
4+
cd $SCRIPT_PATH/..
5+
6+
# Check exit code function
7+
error() {
8+
echo ""
9+
if [[ $1 -eq 0 ]]; then
10+
echo "Installation completed."
11+
echo ""
12+
exit $1
13+
else
14+
if [[ -n $2 ]]; then
15+
echo "$2"
16+
echo ""
17+
fi
18+
19+
echo "Installation failed."
20+
echo ""
21+
exit $1
22+
fi
23+
}
24+
25+
cleaningPreviousScratchOrg() {
26+
sf org delete scratch --no-prompt --target-org $org_alias &> /dev/null
27+
}
28+
29+
creatingScratchOrg () {
30+
echo ""
31+
echo "Org Alias: $org_alias"
32+
echo ""
33+
34+
if [[ -n $npm_config_org_duration ]]; then
35+
days=$npm_config_org_duration
36+
else
37+
days=7
38+
fi
39+
40+
echo "Scratch org duration: $days days"
41+
sf org create scratch --set-default --definition-file config/project-scratch-def.json --duration-days "$days" --alias $org_alias || { error $? '"sf org create scratch" command failed.'; }
42+
}
43+
44+
installDependencies() {
45+
keys=""
46+
for p in $(jq '.packageAliases | keys[]' sfdx-project.json -r);
47+
do
48+
keys+=$p":"$secret" ";
49+
done
50+
sf dependency install --installationkeys "${keys}" --targetusername "$org_alias" --targetdevhubusername "$devHubAlias" || { error $? '"sf dependency install" command failed.'; }
51+
}
52+
53+
deployingMetadata() {
54+
if [[ $npm_config_without_deploy ]]; then
55+
echo "Skipping..."
56+
else
57+
sf project deploy start || { error $? '"sf project deploy start" command failed.'; }
58+
fi
59+
}
60+
61+
#assignPermission() {
62+
# sf org assign permset \
63+
# --name Messaging_Read_and_Write_Messages_and_Threads \
64+
# --name Arbeidsgiver_Dialog_Interne \
65+
# --name Arbeidsgiver_base \
66+
# --name Arbeidsgiver_contract \
67+
# || { error $? '"sf org assign permset" command failed.'; }
68+
#}
69+
70+
#insertingTestData() {
71+
# sf data import tree --plan dummy-data/plan.json || { error $? '"sf data import tree" command failed.'; }
72+
#}
73+
74+
#runPostInstallScripts() {
75+
# sf apex run --file ./scripts/apex/activateMock.cls || { error $? '"sf apex run" command failed for Apex class: "activateMock".'; }
76+
# sf apex run --file ./scripts/apex/createPortalUser.cls || { error $? '"sf apex run" command failed for Apex class: "createPortalUser".'; }
77+
# sf apex run --file ./scripts/apex/createTestData.cls || { error $? '"sf apex run" command failed for Apex class: "createTestData".'; }
78+
#}
79+
80+
#publishCommunity() {
81+
# if [[ $npm_config_without_publish ]]; then
82+
# echo "Skipping..."
83+
# else
84+
# sf community publish --name "arbeidsgiver-dialog" || { error $? '"sf community publish" command failed for community: "arbeidsgiver-dialog".'; }
85+
# fi
86+
#}
87+
88+
openOrg() {
89+
if [[ -n $npm_config_open_in ]]; then
90+
sf org open --browser "$npm_config_open_in" --path "lightning/app/standard__LightningService" || { error $? '"sf org open" command failed.'; }
91+
else
92+
sf org open --path "lightning/app/standard__LightningService" || { error $? '"sf org open" command failed.'; }
93+
fi
94+
}
95+
96+
info() {
97+
echo "Usage: npm run mac:build [options]"
98+
echo ""
99+
echo "Options:"
100+
echo " --package-key=<key> Package key to install"
101+
echo " --org-alias=<alias> Alias for the scratch org"
102+
echo " --org-duration=<days> Duration of the scratch org"
103+
echo " --without-deploy Skip deploy"
104+
#echo " --without-publish Skip publish of community: \"{site name}\""
105+
echo " --open-in=<option> Browser where the org opens."
106+
echo " <options: chrome|edge|firefox>"
107+
echo " --start-step=<step-nummer> Start from a specific step"
108+
echo " --step=<step-nummer> Run a specific step"
109+
#echo " <steps: clean=1|create=2|dependencies=3|deploy=4|permissions=5|test data=6|run scripts=7|publishing site=8|open=9>"
110+
echo " <steps: clean=1|create=2|dependencies=3|deploy=4|open=5>"
111+
echo " --info Show this help"
112+
echo ""
113+
exit 0
114+
}
115+
if [[ $npm_config_info ]]; then
116+
info
117+
elif [[ -z $npm_config_package_key ]]; then
118+
echo "Package key is required."
119+
echo ""
120+
info
121+
fi
122+
123+
sf plugins inspect @dxatscale/sfpowerscripts >/dev/null 2>&1 || {
124+
echo >&2 "\"@dxatscale/sfpowerscripts\" is required, but it's not installed."
125+
echo "Run \"sf plugins install @dxatscale/sfpowerscripts\" to install it."
126+
echo ""
127+
echo "Aborting...."
128+
echo ""
129+
exit 1
130+
}
131+
sf plugins inspect sfdmu >/dev/null 2>&1 || {
132+
echo >&2 "\"sfdmu\" is required, but it's not installed."
133+
echo "Run \"sf plugins install sfdmu\" to install it."
134+
echo ""
135+
echo "Aborting..."
136+
echo ""
137+
exit 1
138+
}
139+
140+
command -v jq >/dev/null 2>&1 || {
141+
echo >&2 "\"jq\" is required, but it's not installed."
142+
echo "Run \"brew install jq\" to install it if you have Homebrew installed."
143+
echo ""
144+
echo "Aborting..."
145+
echo ""
146+
exit 1
147+
}
148+
149+
ORG_ALIAS="arbeidsgiver-kurs"
150+
secret=$npm_config_package_key
151+
devHubAlias=$(sf config get target-dev-hub --json | jq -r '.result[0].value')
152+
153+
if [[ -n $npm_config_org_alias ]]; then
154+
org_alias=$npm_config_org_alias
155+
else
156+
org_alias=$ORG_ALIAS
157+
fi
158+
159+
echo "Installing crm-arbeidsgiver-kurs scratch org ($org_alias)"
160+
echo ""
161+
162+
operations=(
163+
cleaningPreviousScratchOrg
164+
creatingScratchOrg
165+
installDependencies
166+
deployingMetadata
167+
#assignPermission
168+
#insertingTestData
169+
#runPostInstallScripts
170+
#publishCommunity
171+
openOrg
172+
)
173+
174+
operationNames=(
175+
"Cleaning previous scratch org"
176+
"Creating scratch org"
177+
"Installing dependencies"
178+
"Deploying/Pushing metadata"
179+
#"Assigning permissions"
180+
#"Inserting test data"
181+
#"Running post install scripts"
182+
#"Publishing {name} site"
183+
"Opening org"
184+
)
185+
186+
if [[ -n $npm_config_step ]] && [[ -z $npm_config_start_step ]]; then
187+
if [[ "$npm_config_step" =~ ^[0-9]+$ ]] && [[ $npm_config_step -ge 1 ]]; then
188+
j=$((npm_config_step - 1))
189+
else
190+
echo "Invalid step number: $npm_config_step"
191+
exit 1
192+
fi
193+
194+
echo "Running Step $npm_config_step/${#operations[@]}: ${operationNames[$j]}..."
195+
${operations[$j]}
196+
echo ""
197+
exit 0
198+
fi
199+
200+
for i in ${!operations[@]}; do
201+
echo "Step $((i+1))/${#operations[@]}: ${operationNames[$i]}..."
202+
if [[ $((i+1)) -ge $npm_config_start_step ]]; then
203+
${operations[$i]}
204+
else
205+
echo "Skipping..."
206+
fi
207+
208+
echo ""
209+
done
210+
211+
error $?
212+

‎force-app/main/default/applications/Kurs.app-meta.xml

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
33
<actionOverrides>
44
<actionName>View</actionName>
@@ -54,6 +54,24 @@
5454
<type>Flexipage</type>
5555
<pageOrSobjectType>CourseRegistration__c</pageOrSobjectType>
5656
</actionOverrides>
57+
<actionOverrides>
58+
<actionName>View</actionName>
59+
<comment>Action override created by Lightning App Builder during activation.</comment>
60+
<content>Employer_Course_Record_Page</content>
61+
<formFactor>Small</formFactor>
62+
<skipRecordTypeSelect>false</skipRecordTypeSelect>
63+
<type>Flexipage</type>
64+
<pageOrSobjectType>Account</pageOrSobjectType>
65+
</actionOverrides>
66+
<actionOverrides>
67+
<actionName>View</actionName>
68+
<comment>Action override created by Lightning App Builder during activation.</comment>
69+
<content>Employer_Course_Record_Page</content>
70+
<formFactor>Large</formFactor>
71+
<skipRecordTypeSelect>false</skipRecordTypeSelect>
72+
<type>Flexipage</type>
73+
<pageOrSobjectType>Account</pageOrSobjectType>
74+
</actionOverrides>
5775
<brand>
5876
<headerColor>#71C29E</headerColor>
5977
<logo>X1841844986_studentsfirstexperience</logo>
@@ -65,6 +83,7 @@
6583
<formFactors>Large</formFactors>
6684
<isNavAutoTempTabsDisabled>true</isNavAutoTempTabsDisabled>
6785
<isNavPersonalizationDisabled>true</isNavPersonalizationDisabled>
86+
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
6887
<label>Kurs</label>
6988
<navType>Standard</navType>
7089
<tabs>Course__c</tabs>

‎force-app/main/default/classes/CourseSchedulableTest.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class CourseSchedulableTest {
66
}
77
@isTest
88
public static void testCourseSchedulable() {
9-
String cronExpr = '0 0 0 15 3 ? 2025';
9+
String cronExpr = '0 0 0 21 3 ? 2025';
1010

1111
Course__c course1 = CourseRegistrationHandlerTest.getCourse('Testkurs');
1212
course1.RegistrationToDateTime__c = Datetime.Now().addDays(-85);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<flexiPageRegions>
4+
<itemInstances>
5+
<fieldInstance>
6+
<fieldInstanceProperties>
7+
<name>uiBehavior</name>
8+
<value>required</value>
9+
</fieldInstanceProperties>
10+
<fieldItem>Record.Name</fieldItem>
11+
<identifier>RecordNameField</identifier>
12+
</fieldInstance>
13+
</itemInstances>
14+
<name>Facet-f6589c42-c5c7-4ab8-8944-cd96c7314d08</name>
15+
<type>Facet</type>
16+
</flexiPageRegions>
17+
<flexiPageRegions>
18+
<itemInstances>
19+
<fieldInstance>
20+
<fieldInstanceProperties>
21+
<name>uiBehavior</name>
22+
<value>none</value>
23+
</fieldInstanceProperties>
24+
<fieldItem>Record.OrganizationNumberFormula__c</fieldItem>
25+
<identifier>RecordOrganizationNumberFormula_cField</identifier>
26+
</fieldInstance>
27+
</itemInstances>
28+
<name>Facet-1fee5b0f-cbe8-4924-8d68-1d0d78fd325b</name>
29+
<type>Facet</type>
30+
</flexiPageRegions>
31+
<flexiPageRegions>
32+
<itemInstances>
33+
<componentInstance>
34+
<componentInstanceProperties>
35+
<name>numVisibleActions</name>
36+
<value>3</value>
37+
</componentInstanceProperties>
38+
<componentInstanceProperties>
39+
<name>primaryField</name>
40+
<value>Facet-f6589c42-c5c7-4ab8-8944-cd96c7314d08</value>
41+
</componentInstanceProperties>
42+
<componentInstanceProperties>
43+
<name>secondaryFields</name>
44+
<value>Facet-1fee5b0f-cbe8-4924-8d68-1d0d78fd325b</value>
45+
</componentInstanceProperties>
46+
<componentName>record_flexipage:dynamicHighlights</componentName>
47+
<identifier>record_flexipage_dynamicHighlights</identifier>
48+
</componentInstance>
49+
</itemInstances>
50+
<name>header</name>
51+
<type>Region</type>
52+
</flexiPageRegions>
53+
<flexiPageRegions>
54+
<itemInstances>
55+
<fieldInstance>
56+
<fieldInstanceProperties>
57+
<name>uiBehavior</name>
58+
<value>none</value>
59+
</fieldInstanceProperties>
60+
<fieldItem>Record.CRM_MainIndustry__c</fieldItem>
61+
<identifier>RecordCRM_MainIndustry_cField</identifier>
62+
</fieldInstance>
63+
</itemInstances>
64+
<name>Facet-f9aba25e-8bfe-4de4-8ffd-1f9a3cb8a27c</name>
65+
<type>Facet</type>
66+
</flexiPageRegions>
67+
<flexiPageRegions>
68+
<itemInstances>
69+
<fieldInstance>
70+
<fieldInstanceProperties>
71+
<name>uiBehavior</name>
72+
<value>readonly</value>
73+
</fieldInstanceProperties>
74+
<fieldItem>Record.TAG_NavUnit__c</fieldItem>
75+
<identifier>RecordTAG_NavUnit_cField</identifier>
76+
</fieldInstance>
77+
</itemInstances>
78+
<name>Facet-53a3b63b-d265-4d82-a909-9765d3852f34</name>
79+
<type>Facet</type>
80+
</flexiPageRegions>
81+
<flexiPageRegions>
82+
<itemInstances>
83+
<componentInstance>
84+
<componentInstanceProperties>
85+
<name>body</name>
86+
<value>Facet-f9aba25e-8bfe-4de4-8ffd-1f9a3cb8a27c</value>
87+
</componentInstanceProperties>
88+
<componentName>flexipage:column</componentName>
89+
<identifier>flexipage_column</identifier>
90+
</componentInstance>
91+
</itemInstances>
92+
<itemInstances>
93+
<componentInstance>
94+
<componentInstanceProperties>
95+
<name>body</name>
96+
<value>Facet-53a3b63b-d265-4d82-a909-9765d3852f34</value>
97+
</componentInstanceProperties>
98+
<componentName>flexipage:column</componentName>
99+
<identifier>flexipage_column2</identifier>
100+
</componentInstance>
101+
</itemInstances>
102+
<name>Facet-4cc33854-1a3f-45c1-9f47-7ed608330945</name>
103+
<type>Facet</type>
104+
</flexiPageRegions>
105+
<flexiPageRegions>
106+
<itemInstances>
107+
<componentInstance>
108+
<componentInstanceProperties>
109+
<name>columns</name>
110+
<value>Facet-4cc33854-1a3f-45c1-9f47-7ed608330945</value>
111+
</componentInstanceProperties>
112+
<componentInstanceProperties>
113+
<name>horizontalAlignment</name>
114+
<value>false</value>
115+
</componentInstanceProperties>
116+
<componentInstanceProperties>
117+
<name>label</name>
118+
<value>Section</value>
119+
</componentInstanceProperties>
120+
<componentName>flexipage:fieldSection</componentName>
121+
<identifier>flexipage_fieldSection</identifier>
122+
</componentInstance>
123+
</itemInstances>
124+
<name>main</name>
125+
<type>Region</type>
126+
</flexiPageRegions>
127+
<masterLabel>Employer Course Record Page</masterLabel>
128+
<sobjectType>Account</sobjectType>
129+
<template>
130+
<name>flexipage:recordHomeSimpleViewTemplate</name>
131+
<properties>
132+
<name>enablePageActionConfig</name>
133+
<value>false</value>
134+
</properties>
135+
</template>
136+
<type>RecordPage</type>
137+
</FlexiPage>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>63.0</apiVersion>
4+
<decisions>
5+
<name>Is_task_from_course</name>
6+
<label>Is task from course?</label>
7+
<locationX>182</locationX>
8+
<locationY>287</locationY>
9+
<defaultConnectorLabel>Not from course</defaultConnectorLabel>
10+
<rules>
11+
<name>Yes_is_from_course</name>
12+
<conditionLogic>or</conditionLogic>
13+
<conditions>
14+
<leftValueReference>FirstThreeDigitsOfRecordId</leftValueReference>
15+
<operator>EqualTo</operator>
16+
<rightValue>
17+
<stringValue>a16</stringValue>
18+
</rightValue>
19+
</conditions>
20+
<conditions>
21+
<leftValueReference>FirstThreeDigitsOfRecordId</leftValueReference>
22+
<operator>EqualTo</operator>
23+
<rightValue>
24+
<stringValue>a19</stringValue>
25+
</rightValue>
26+
</conditions>
27+
<connector>
28+
<targetReference>Get_record_type_id</targetReference>
29+
</connector>
30+
<label>Yes is from course</label>
31+
</rules>
32+
</decisions>
33+
<environments>Default</environments>
34+
<formulas>
35+
<name>FirstThreeDigitsOfRecordId</name>
36+
<dataType>String</dataType>
37+
<expression>LEFT({!$Record.WhatId}, 3)</expression>
38+
</formulas>
39+
<interviewLabel>HOT Course set Task record type {!$Flow.CurrentDateTime}</interviewLabel>
40+
<label>HOT Course set Task record type</label>
41+
<processMetadataValues>
42+
<name>BuilderType</name>
43+
<value>
44+
<stringValue>LightningFlowBuilder</stringValue>
45+
</value>
46+
</processMetadataValues>
47+
<processMetadataValues>
48+
<name>CanvasMode</name>
49+
<value>
50+
<stringValue>AUTO_LAYOUT_CANVAS</stringValue>
51+
</value>
52+
</processMetadataValues>
53+
<processMetadataValues>
54+
<name>OriginBuilderType</name>
55+
<value>
56+
<stringValue>LightningFlowBuilder</stringValue>
57+
</value>
58+
</processMetadataValues>
59+
<processType>AutoLaunchedFlow</processType>
60+
<recordLookups>
61+
<name>Get_record_type_id</name>
62+
<label>Get record type id</label>
63+
<locationX>50</locationX>
64+
<locationY>395</locationY>
65+
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
66+
<connector>
67+
<targetReference>Update_task</targetReference>
68+
</connector>
69+
<filterLogic>and</filterLogic>
70+
<filters>
71+
<field>DeveloperName</field>
72+
<operator>EqualTo</operator>
73+
<value>
74+
<stringValue>HOT_course</stringValue>
75+
</value>
76+
</filters>
77+
<getFirstRecordOnly>true</getFirstRecordOnly>
78+
<object>RecordType</object>
79+
<storeOutputAutomatically>true</storeOutputAutomatically>
80+
</recordLookups>
81+
<recordUpdates>
82+
<name>Update_task</name>
83+
<label>Update task</label>
84+
<locationX>50</locationX>
85+
<locationY>503</locationY>
86+
<inputAssignments>
87+
<field>RecordTypeId</field>
88+
<value>
89+
<elementReference>Get_record_type_id.Id</elementReference>
90+
</value>
91+
</inputAssignments>
92+
<inputReference>$Record</inputReference>
93+
</recordUpdates>
94+
<start>
95+
<locationX>56</locationX>
96+
<locationY>0</locationY>
97+
<connector>
98+
<targetReference>Is_task_from_course</targetReference>
99+
</connector>
100+
<filterLogic>and</filterLogic>
101+
<filters>
102+
<field>TAG_ActivityType__c</field>
103+
<operator>IsNull</operator>
104+
<value>
105+
<booleanValue>true</booleanValue>
106+
</value>
107+
</filters>
108+
<filters>
109+
<field>WhatId</field>
110+
<operator>IsNull</operator>
111+
<value>
112+
<booleanValue>false</booleanValue>
113+
</value>
114+
</filters>
115+
<object>Task</object>
116+
<recordTriggerType>Create</recordTriggerType>
117+
<triggerType>RecordBeforeSave</triggerType>
118+
</start>
119+
<status>Draft</status>
120+
</Flow>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>63.0</apiVersion>
4+
<decisions>
5+
<name>Is_task_from_course</name>
6+
<label>Is task from course?</label>
7+
<locationX>182</locationX>
8+
<locationY>287</locationY>
9+
<defaultConnectorLabel>Not from course</defaultConnectorLabel>
10+
<rules>
11+
<name>Yes_is_from_course</name>
12+
<conditionLogic>or</conditionLogic>
13+
<conditions>
14+
<leftValueReference>FirstThreeDigitsOfRecordId</leftValueReference>
15+
<operator>EqualTo</operator>
16+
<rightValue>
17+
<stringValue>a16</stringValue>
18+
</rightValue>
19+
</conditions>
20+
<conditions>
21+
<leftValueReference>FirstThreeDigitsOfRecordId</leftValueReference>
22+
<operator>EqualTo</operator>
23+
<rightValue>
24+
<stringValue>a19</stringValue>
25+
</rightValue>
26+
</conditions>
27+
<connector>
28+
<targetReference>Get_record_type_id</targetReference>
29+
</connector>
30+
<label>Yes is from course</label>
31+
</rules>
32+
</decisions>
33+
<environments>Default</environments>
34+
<formulas>
35+
<name>FirstThreeDigitsOfRecordId</name>
36+
<dataType>String</dataType>
37+
<expression>LEFT({!$Record.WhatId}, 3)</expression>
38+
</formulas>
39+
<interviewLabel>HOT Course set Task record type trigger {!$Flow.CurrentDateTime}</interviewLabel>
40+
<label>HOT Course set Task record type trigger</label>
41+
<processMetadataValues>
42+
<name>BuilderType</name>
43+
<value>
44+
<stringValue>LightningFlowBuilder</stringValue>
45+
</value>
46+
</processMetadataValues>
47+
<processMetadataValues>
48+
<name>CanvasMode</name>
49+
<value>
50+
<stringValue>AUTO_LAYOUT_CANVAS</stringValue>
51+
</value>
52+
</processMetadataValues>
53+
<processMetadataValues>
54+
<name>OriginBuilderType</name>
55+
<value>
56+
<stringValue>LightningFlowBuilder</stringValue>
57+
</value>
58+
</processMetadataValues>
59+
<processType>AutoLaunchedFlow</processType>
60+
<recordLookups>
61+
<name>Get_record_type_id</name>
62+
<label>Get record type id</label>
63+
<locationX>50</locationX>
64+
<locationY>395</locationY>
65+
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
66+
<connector>
67+
<targetReference>Update_task</targetReference>
68+
</connector>
69+
<filterLogic>and</filterLogic>
70+
<filters>
71+
<field>DeveloperName</field>
72+
<operator>EqualTo</operator>
73+
<value>
74+
<stringValue>HOT_course</stringValue>
75+
</value>
76+
</filters>
77+
<getFirstRecordOnly>true</getFirstRecordOnly>
78+
<object>RecordType</object>
79+
<storeOutputAutomatically>true</storeOutputAutomatically>
80+
</recordLookups>
81+
<recordUpdates>
82+
<name>Update_task</name>
83+
<label>Update task</label>
84+
<locationX>50</locationX>
85+
<locationY>503</locationY>
86+
<inputAssignments>
87+
<field>RecordTypeId</field>
88+
<value>
89+
<elementReference>Get_record_type_id.Id</elementReference>
90+
</value>
91+
</inputAssignments>
92+
<inputReference>$Record</inputReference>
93+
</recordUpdates>
94+
<start>
95+
<locationX>56</locationX>
96+
<locationY>0</locationY>
97+
<connector>
98+
<targetReference>Is_task_from_course</targetReference>
99+
</connector>
100+
<filterLogic>and</filterLogic>
101+
<filters>
102+
<field>TAG_ActivityType__c</field>
103+
<operator>IsNull</operator>
104+
<value>
105+
<booleanValue>true</booleanValue>
106+
</value>
107+
</filters>
108+
<filters>
109+
<field>WhatId</field>
110+
<operator>IsNull</operator>
111+
<value>
112+
<booleanValue>false</booleanValue>
113+
</value>
114+
</filters>
115+
<object>Task</object>
116+
<recordTriggerType>Create</recordTriggerType>
117+
<triggerType>RecordBeforeSave</triggerType>
118+
</start>
119+
<status>Active</status>
120+
</Flow>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<RecordType xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<fullName>HOT_course</fullName>
4+
<active>true</active>
5+
<description>Record type for eposter som sendes i sammenheng med kurs</description>
6+
<label>HOT course</label>
7+
<picklistValues>
8+
<picklist>Priority</picklist>
9+
<values>
10+
<fullName>High</fullName>
11+
<default>false</default>
12+
</values>
13+
<values>
14+
<fullName>Low</fullName>
15+
<default>false</default>
16+
</values>
17+
<values>
18+
<fullName>Normal</fullName>
19+
<default>true</default>
20+
</values>
21+
</picklistValues>
22+
<picklistValues>
23+
<picklist>Status</picklist>
24+
<values>
25+
<fullName>Completed</fullName>
26+
<default>false</default>
27+
</values>
28+
<values>
29+
<fullName>Deferred</fullName>
30+
<default>false</default>
31+
</values>
32+
<values>
33+
<fullName>In Progress</fullName>
34+
<default>false</default>
35+
</values>
36+
<values>
37+
<fullName>Not Started</fullName>
38+
<default>true</default>
39+
</values>
40+
<values>
41+
<fullName>Waiting on someone else</fullName>
42+
<default>false</default>
43+
</values>
44+
</picklistValues>
45+
<picklistValues>
46+
<picklist>Subject</picklist>
47+
<values>
48+
<fullName>Call</fullName>
49+
<default>false</default>
50+
</values>
51+
<values>
52+
<fullName>Other</fullName>
53+
<default>false</default>
54+
</values>
55+
<values>
56+
<fullName>Send Letter</fullName>
57+
<default>false</default>
58+
</values>
59+
<values>
60+
<fullName>Send Quote</fullName>
61+
<default>false</default>
62+
</values>
63+
</picklistValues>
64+
<picklistValues>
65+
<picklist>TAG_ActivityType__c</picklist>
66+
<values>
67+
<fullName>Forebygge sykefravær og redusere frafall</fullName>
68+
<default>false</default>
69+
</values>
70+
<values>
71+
<fullName>Nedbemanne</fullName>
72+
<default>false</default>
73+
</values>
74+
<values>
75+
<fullName>Prioritert IA %28Fia%29</fullName>
76+
<default>false</default>
77+
</values>
78+
<values>
79+
<fullName>Rekruttere og inkludere</fullName>
80+
<default>false</default>
81+
</values>
82+
</picklistValues>
83+
<picklistValues>
84+
<picklist>TAG_service__c</picklist>
85+
<values>
86+
<fullName>Forbyggende arbeidsmiljøarbeid</fullName>
87+
<default>false</default>
88+
</values>
89+
<values>
90+
<fullName>Helse i arbeid</fullName>
91+
<default>false</default>
92+
</values>
93+
<values>
94+
<fullName>IPS Jobbstøtte</fullName>
95+
<default>false</default>
96+
</values>
97+
<values>
98+
<fullName>IPS Jobbutvikling</fullName>
99+
<default>false</default>
100+
</values>
101+
<values>
102+
<fullName>Informasjon om NAVs tjenester</fullName>
103+
<default>false</default>
104+
</values>
105+
<values>
106+
<fullName>Inkluderende rekruttering</fullName>
107+
<default>false</default>
108+
</values>
109+
<values>
110+
<fullName>Jobbmesser og møteplasser</fullName>
111+
<default>false</default>
112+
</values>
113+
<values>
114+
<fullName>Masseoppsigelser</fullName>
115+
<default>false</default>
116+
</values>
117+
<values>
118+
<fullName>Permittering</fullName>
119+
<default>false</default>
120+
</values>
121+
<values>
122+
<fullName>Redusere sykefravær</fullName>
123+
<default>false</default>
124+
</values>
125+
<values>
126+
<fullName>Rekrutteringsoppdrag</fullName>
127+
<default>false</default>
128+
</values>
129+
<values>
130+
<fullName>Utvikle partssamarbeid</fullName>
131+
<default>false</default>
132+
</values>
133+
</picklistValues>
134+
<picklistValues>
135+
<picklist>Type</picklist>
136+
<values>
137+
<fullName>Call</fullName>
138+
<default>false</default>
139+
</values>
140+
<values>
141+
<fullName>Meeting</fullName>
142+
<default>false</default>
143+
</values>
144+
<values>
145+
<fullName>Other</fullName>
146+
<default>false</default>
147+
</values>
148+
</picklistValues>
149+
</RecordType>

‎force-app/main/default/permissionsets/Course_Admin.permissionset-meta.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@
593593
<recordType>Account.Employer</recordType>
594594
<visible>true</visible>
595595
</recordTypeVisibilities>
596+
<recordTypeVisibilities>
597+
<recordType>Task.HOT_course</recordType>
598+
<visible>true</visible>
599+
</recordTypeVisibilities>
596600
<tabSettings>
597601
<tab>Course__c</tab>
598602
<visibility>Visible</visibility>
@@ -625,4 +629,4 @@
625629
<enabled>true</enabled>
626630
<name>ViewPublicReports</name>
627631
</userPermissions>
628-
</PermissionSet>
632+
</PermissionSet>

0 commit comments

Comments
 (0)
Please sign in to comment.