Skip to content

Commit

Permalink
Merge branch 'setUpAmplitude' of https://github.com/navikt/crm-sto in…
Browse files Browse the repository at this point in the history
…to setUpAmplitude
  • Loading branch information
saramoh2309 committed Feb 4, 2025
2 parents 0cfed71 + 2683b87 commit bf4d311
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 16 deletions.
4 changes: 4 additions & 0 deletions force-app/main/default/classes/stoHelperClass.cls
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ public with sharing class stoHelperClass {
thread.CRM_Thread_Type__c = allowedThreadTypes.contains(type) ? type : 'STO';
thread.STO_Category__c = theme;
thread.STO_Medskriv__c = medskriv;
List<RecordType> recordType = [SELECT Id FROM RecordType WHERE SObjectType = 'Thread__c' AND Name = 'NKS Thread' LIMIT 1];
if (!recordType.isEmpty()) {
thread.recordTypeId = recordType[0].Id;
}
try {
insert thread;
} catch (DmlException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Check_Inputs</name>
<label>Check Inputs</label>
<locationX>176</locationX>
<locationY>158</locationY>
<locationY>134</locationY>
<defaultConnector>
<targetReference>Get_Thread_API_Reference</targetReference>
</defaultConnector>
Expand All @@ -26,6 +26,7 @@
<label>Has Thread ID</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>Ca {!$Flow.CurrentDateTime}</interviewLabel>
<label>Case Journal STO Thread</label>
<processMetadataValues>
Expand All @@ -51,7 +52,7 @@
<name>Get_Thread</name>
<label>Get Thread</label>
<locationX>176</locationX>
<locationY>494</locationY>
<locationY>434</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Thread_Journal_Screen</targetReference>
Expand Down Expand Up @@ -79,7 +80,7 @@
<name>Get_Thread_API_Reference</name>
<label>Get Thread API Reference</label>
<locationX>264</locationX>
<locationY>278</locationY>
<locationY>242</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Get_Thread</targetReference>
Expand All @@ -103,7 +104,7 @@
<name>Journal_Success_Screen_0</name>
<label>Journal Success Screen</label>
<locationX>176</locationX>
<locationY>974</locationY>
<locationY>866</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
Expand Down Expand Up @@ -134,7 +135,7 @@
<name>Thread_Journal_Screen</name>
<label>Thread Journal Screen</label>
<locationX>176</locationX>
<locationY>614</locationY>
<locationY>542</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
Expand Down Expand Up @@ -177,7 +178,7 @@
<name>Create_Journal_Entry</name>
<label>Create Journal Entry</label>
<locationX>176</locationX>
<locationY>734</locationY>
<locationY>650</locationY>
<connector>
<targetReference>Create_Thread_Journal_Event</targetReference>
</connector>
Expand Down Expand Up @@ -206,6 +207,12 @@
<elementReference>$User.Department</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Subtheme_Code</name>
<value>
<elementReference>NAV_Case_Overview.selectedSubtheme</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Theme_Code</name>
<value>
Expand All @@ -223,7 +230,7 @@
<name>Create_Thread_Journal_Event</name>
<label>Create Thread Journal Event</label>
<locationX>176</locationX>
<locationY>854</locationY>
<locationY>758</locationY>
<connector>
<targetReference>Journal_Success_Screen_0</targetReference>
</connector>
Expand Down
27 changes: 27 additions & 0 deletions force-app/main/default/flows/Case_STO_Journal_v_2.flow-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@
<assignToReference>Selected_Theme_SF_Id</assignToReference>
<name>selectedCaseThemeSfId</name>
</outputParameters>
<outputParameters>
<assignToReference>Selected_Subtheme</assignToReference>
<name>selectedSubtheme</name>
</outputParameters>
</fields>
<nextOrFinishButtonLabel>Journalfør</nextOrFinishButtonLabel>
<showFooter>true</showFooter>
Expand Down Expand Up @@ -226,6 +230,10 @@
<assignToReference>Selected_Theme_SF_Id</assignToReference>
<name>selectedCaseThemeSfId</name>
</outputParameters>
<outputParameters>
<assignToReference>Selected_Subtheme</assignToReference>
<name>selectedSubtheme</name>
</outputParameters>
</fields>
<nextOrFinishButtonLabel>Journalfør</nextOrFinishButtonLabel>
<showFooter>true</showFooter>
Expand Down Expand Up @@ -272,6 +280,12 @@
<elementReference>$User.Department</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Subtheme_Code</name>
<value>
<elementReference>Selected_Subtheme</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Theme_Code</name>
<value>
Expand Down Expand Up @@ -326,6 +340,12 @@
<elementReference>$User.Department</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Subtheme_Code</name>
<value>
<elementReference>Selected_Subtheme</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Theme_Code</name>
<value>
Expand Down Expand Up @@ -445,6 +465,13 @@
<isInput>false</isInput>
<isOutput>false</isOutput>
</variables>
<variables>
<name>Selected_Subtheme</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
</variables>
<variables>
<name>Selected_Theme_SF_Id</name>
<dataType>String</dataType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>52.0</apiVersion>
<environments>Default</environments>
<interviewLabel>Create Thread Journal Entry {!$Flow.CurrentDateTime}</interviewLabel>
<label>Create Thread Journal Entry</label>
<processMetadataValues>
Expand All @@ -26,7 +27,7 @@
<name>Get_Thread</name>
<label>Get Thread</label>
<locationX>176</locationX>
<locationY>158</locationY>
<locationY>134</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Thread_Journal_Screen</targetReference>
Expand All @@ -48,7 +49,7 @@
<name>Journal_Success_Screen_0</name>
<label>Journal Success Screen</label>
<locationX>176</locationX>
<locationY>638</locationY>
<locationY>566</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
Expand Down Expand Up @@ -79,7 +80,7 @@
<name>Thread_Journal_Screen</name>
<label>Thread Journal Screen</label>
<locationX>176</locationX>
<locationY>278</locationY>
<locationY>242</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
Expand Down Expand Up @@ -122,7 +123,7 @@
<name>Create_Journal_Entry</name>
<label>Create Journal Entry</label>
<locationX>176</locationX>
<locationY>398</locationY>
<locationY>350</locationY>
<connector>
<targetReference>Create_Thread_Journal_Event</targetReference>
</connector>
Expand Down Expand Up @@ -151,6 +152,12 @@
<elementReference>$User.Department</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Subtheme_Code</name>
<value>
<elementReference>NAV_Case_Overview.selectedSubtheme</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<name>Journal_Theme_Code</name>
<value>
Expand All @@ -168,7 +175,7 @@
<name>Create_Thread_Journal_Event</name>
<label>Create Thread Journal Event</label>
<locationX>176</locationX>
<locationY>518</locationY>
<locationY>458</locationY>
<connector>
<targetReference>Journal_Success_Screen_0</targetReference>
</connector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,8 @@
<object>Thread__c</object>
<viewAllRecords>false</viewAllRecords>
</objectPermissions>
</PermissionSet>
<recordTypeVisibilities>
<recordType>Thread__c.NKS_Thread</recordType>
<visible>true</visible>
</recordTypeVisibilities>
</PermissionSet>
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,8 @@
<apexPage>CRM_Thread_PDF</apexPage>
<enabled>true</enabled>
</pageAccesses>
<recordTypeVisibilities>
<recordType>Thread__c.NKS_Thread</recordType>
<visible>true</visible>
</recordTypeVisibilities>
</PermissionSet>
6 changes: 3 additions & 3 deletions sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"path": "force-app",
"default": true,
"versionName": "ver 1.0",
"versionNumber": "1.181.0.NEXT",
"versionNumber": "1.182.0.NEXT",
"package": "crm-sto",
"dependencies": [
{
Expand All @@ -21,7 +21,7 @@
},
{
"package": "crm-henvendelse-base",
"versionNumber": "0.25.0.LATEST"
"versionNumber": "0.28.0.LATEST"
},
{
"package": "crm-platform-integration",
Expand Down Expand Up @@ -49,7 +49,7 @@
},
{
"package": "crm-henvendelse",
"versionNumber": "0.155.0.LATEST"
"versionNumber": "0.158.0.LATEST"
},
{
"package": "crm-sf-saf",
Expand Down

0 comments on commit bf4d311

Please sign in to comment.