-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
126 changes: 126 additions & 0 deletions
126
force-app/main/default/flows/Add_Account_team_member_fro_FIA_Owner.flow-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Flow xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<environments>Default</environments> | ||
<interviewLabel>Add Account team member fro FIA Owner {!$Flow.CurrentDateTime}</interviewLabel> | ||
<label>Add Account team member fro FIA Owner</label> | ||
<processMetadataValues> | ||
<name>BuilderType</name> | ||
<value> | ||
<stringValue>LightningFlowBuilder</stringValue> | ||
</value> | ||
</processMetadataValues> | ||
<processMetadataValues> | ||
<name>CanvasMode</name> | ||
<value> | ||
<stringValue>AUTO_LAYOUT_CANVAS</stringValue> | ||
</value> | ||
</processMetadataValues> | ||
<processMetadataValues> | ||
<name>OriginBuilderType</name> | ||
<value> | ||
<stringValue>LightningFlowBuilder</stringValue> | ||
</value> | ||
</processMetadataValues> | ||
<processType>AutoLaunchedFlow</processType> | ||
<recordCreates> | ||
<name>Create_account_team_member</name> | ||
<label>Create account team member</label> | ||
<locationX>176</locationX> | ||
<locationY>455</locationY> | ||
<inputAssignments> | ||
<field>AccountId</field> | ||
<value> | ||
<elementReference>$Record.Id</elementReference> | ||
</value> | ||
</inputAssignments> | ||
<inputAssignments> | ||
<field>Departments__c</field> | ||
<value> | ||
<stringValue>Forebygge og redusere sykefravær og frafall</stringValue> | ||
</value> | ||
</inputAssignments> | ||
<inputAssignments> | ||
<field>TAG_Active__c</field> | ||
<value> | ||
<booleanValue>true</booleanValue> | ||
</value> | ||
</inputAssignments> | ||
<inputAssignments> | ||
<field>TeamMemberRole</field> | ||
<value> | ||
<stringValue>IA Consultant</stringValue> | ||
</value> | ||
</inputAssignments> | ||
<inputAssignments> | ||
<field>UserId</field> | ||
<value> | ||
<elementReference>Get_User_Record.Id</elementReference> | ||
</value> | ||
</inputAssignments> | ||
<object>AccountTeamMember</object> | ||
<storeOutputAutomatically>true</storeOutputAutomatically> | ||
</recordCreates> | ||
<recordLookups> | ||
<description>Get user record from FIA Owner</description> | ||
<name>Get_User_Record</name> | ||
<label>Get User Record</label> | ||
<locationX>176</locationX> | ||
<locationY>335</locationY> | ||
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound> | ||
<connector> | ||
<targetReference>Create_account_team_member</targetReference> | ||
</connector> | ||
<filterLogic>and</filterLogic> | ||
<filters> | ||
<field>CRM_NAV_Ident__c</field> | ||
<operator>EqualTo</operator> | ||
<value> | ||
<elementReference>$Record.TAG_FiaCaseOwner__c</elementReference> | ||
</value> | ||
</filters> | ||
<getFirstRecordOnly>true</getFirstRecordOnly> | ||
<object>User</object> | ||
<storeOutputAutomatically>true</storeOutputAutomatically> | ||
</recordLookups> | ||
<start> | ||
<locationX>50</locationX> | ||
<locationY>0</locationY> | ||
<connector> | ||
<targetReference>Get_User_Record</targetReference> | ||
</connector> | ||
<filterLogic>and</filterLogic> | ||
<filters> | ||
<field>TAG_FiaCaseStatus__c</field> | ||
<operator>IsChanged</operator> | ||
<value> | ||
<booleanValue>true</booleanValue> | ||
</value> | ||
</filters> | ||
<filters> | ||
<field>RecordTypeId</field> | ||
<operator>EqualTo</operator> | ||
<value> | ||
<stringValue>0122o000000RC7PAAW</stringValue> | ||
</value> | ||
</filters> | ||
<filters> | ||
<field>TAG_FiaCaseNr__c</field> | ||
<operator>IsNull</operator> | ||
<value> | ||
<booleanValue>false</booleanValue> | ||
</value> | ||
</filters> | ||
<filters> | ||
<field>TAG_FiaCaseStatus__c</field> | ||
<operator>EqualTo</operator> | ||
<value> | ||
<stringValue>Vi_Bistår</stringValue> | ||
</value> | ||
</filters> | ||
<object>Account</object> | ||
<recordTriggerType>Update</recordTriggerType> | ||
<triggerType>RecordAfterSave</triggerType> | ||
</start> | ||
<status>Obsolete</status> | ||
</Flow> |
35 changes: 35 additions & 0 deletions
35
...efault/flowtests/Add_Account_team_member_fro_FIA_Owner_Test_min_bedrift.flowtest-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<FlowTest xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<flowApiName>Add_Account_team_member_fro_FIA_Owner</flowApiName> | ||
<label>Test min bedrift</label> | ||
<testPoints> | ||
<elementApiName>Start</elementApiName> | ||
<parameters> | ||
<leftValueReference>$Record</leftValueReference> | ||
<type>InputTriggeringRecordInitial</type> | ||
<value> | ||
<sobjectValue>{"Alias__c":"123","Bypass_Validation__c":false,"CRM_IsPilot__c":false,"CRM_UltimateParentAccount__c":"0011x00001iLaqEAAS","FirstName":{},"INT_IndustryCode__c":"02.200","INT_Industry__c":"Avvirkning","INT_IsBankrupt__c":false,"INT_IsHasTombstone__c":false,"INT_IsInForcedSettlementOrResolution__c":false,"INT_IsInLiquidation__c":false,"INT_OrganizationNumber__c":"960507878","InvalidEmail__pc":{},"IsDeletedEmployer__c":false,"LastName":{},"MiddleName":{},"Name":"Min bedrift","OwnerId":"0051x00000CRT85AAH","PersonDoNotCall":false,"PersonEmail":{},"PersonHasOptedOutOfEmail":false,"PersonHasOptedOutOfFax":false,"PersonLeadSource":{},"PersonMailingCity":{},"PersonMailingCountry":{},"PersonMailingLatitude":{},"PersonMailingLongitude":{},"PersonMailingPostalCode":{},"PersonMailingState":{},"PersonMailingStreet":{},"PersonMobilePhone":{},"PersonTitle":{},"RecordTypeId":"0121x000005MTfBAAW","Salutation":{},"Source__pc":{},"TAG_FiaCaseOwnerName__c":"","TAG_FiaCaseOwner__c":"","TAG_Force_Update__c":false,"TAG_IAOwner__pc":{},"TAG_InclusionOwner__pc":{},"TAG_Informed__pc":false,"TAG_IsDeleted__c":false,"TAG_Theme__pc":{},"Warning__c":false}</sobjectValue> | ||
</value> | ||
</parameters> | ||
<parameters> | ||
<leftValueReference>$Record</leftValueReference> | ||
<type>InputTriggeringRecordUpdated</type> | ||
<value> | ||
<sobjectValue>{"Bypass_Validation__c":false,"CRM_IsPilot__c":false,"CRM_UltimateParentAccount__c":"0011x00001iLaqEAAS","FirstName":{},"INT_IndustryCode__c":"02.200","INT_Industry__c":"Avvirkning","INT_IsBankrupt__c":false,"INT_IsHasTombstone__c":false,"INT_IsInForcedSettlementOrResolution__c":false,"INT_IsInLiquidation__c":false,"INT_OrganizationNumber__c":"960507878","InvalidEmail__pc":{},"IsDeletedEmployer__c":false,"LastName":{},"MiddleName":{},"Name":"Min bedrift","OwnerId":"0051x00000CRT85AAH","PersonDoNotCall":false,"PersonEmail":{},"PersonHasOptedOutOfEmail":false,"PersonHasOptedOutOfFax":false,"PersonLeadSource":{},"PersonMailingCity":{},"PersonMailingCountry":{},"PersonMailingLatitude":{},"PersonMailingLongitude":{},"PersonMailingPostalCode":{},"PersonMailingState":{},"PersonMailingStreet":{},"PersonMobilePhone":{},"PersonTitle":{},"RecordTypeId":"0121x000005MTfBAAW","Salutation":{},"Source__pc":{},"TAG_FiaCaseOwnerName__c":"","TAG_FiaCaseOwner__c":"","TAG_Force_Update__c":false,"TAG_IAOwner__pc":{},"TAG_InclusionOwner__pc":{},"TAG_Informed__pc":false,"TAG_IsDeleted__c":false,"TAG_Theme__pc":{},"Warning__c":false}</sobjectValue> | ||
</value> | ||
</parameters> | ||
</testPoints> | ||
<testPoints> | ||
<assertions> | ||
<conditions> | ||
<leftValueReference>Get_User_Record</leftValueReference> | ||
<operator>IsNull</operator> | ||
<rightValue> | ||
<booleanValue>false</booleanValue> | ||
</rightValue> | ||
</conditions> | ||
<errorMessage>Finner ikke NAV ansatt</errorMessage> | ||
</assertions> | ||
<elementApiName>Finish</elementApiName> | ||
</testPoints> | ||
</FlowTest> |