Skip to content

Commit

Permalink
Merge pull request #863 from bcgov/feature-ALR-668
Browse files Browse the repository at this point in the history
ALR-668
  • Loading branch information
dolly-chaurpagar authored Jun 17, 2024
2 parents 6a3cb2a + 3e4360a commit faf8353
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>License_Type_Name1__c</fullName>
<externalId>false</externalId>
<label>License Type Name1</label>
<length>255</length>
<required>false</required>
<trackFeedHistory>false</trackFeedHistory>
<trackHistory>false</trackHistory>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<DuplicateRule xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<actionOnInsert>Allow</actionOnInsert>
<actionOnUpdate>Allow</actionOnUpdate>
<alertText>Use one of these records?</alertText>
<description xsi:nil="true"/>
<duplicateRuleFilter>
<booleanFilter xsi:nil="true"/>
<duplicateRuleFilterItems>
<field>RecordType</field>
<operation>equals</operation>
<value>Registrant</value>
<sortOrder>1</sortOrder>
<table>Account</table>
</duplicateRuleFilterItems>
</duplicateRuleFilter>
<duplicateRuleMatchRules>
<matchRuleSObjectType>Account</matchRuleSObjectType>
<matchingRule>Registrant_Account_Matching_Rule</matchingRule>
<objectMapping xsi:nil="true"/>
</duplicateRuleMatchRules>
<isActive>true</isActive>
<masterLabel>Registrant_Account_Duplicate_Rule</masterLabel>
<operationsOnInsert>Alert</operationsOnInsert>
<operationsOnUpdate>Alert</operationsOnUpdate>
<securityOption>BypassSharingRules</securityOption>
<sortOrder>3</sortOrder>
</DuplicateRule>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<DuplicateRule xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<actionOnInsert>Allow</actionOnInsert>
<actionOnUpdate>Allow</actionOnUpdate>
<alertText>Use one of these records?</alertText>
<description xsi:nil="true"/>
<duplicateRuleFilter>
<booleanFilter xsi:nil="true"/>
<duplicateRuleFilterItems>
<field>RecordType</field>
<operation>equals</operation>
<value>Residence</value>
<sortOrder>1</sortOrder>
<table>Account</table>
</duplicateRuleFilterItems>
</duplicateRuleFilter>
<duplicateRuleMatchRules>
<matchRuleSObjectType>Account</matchRuleSObjectType>
<matchingRule>Residence_Account_Matching_Rule</matchingRule>
<objectMapping xsi:nil="true"/>
</duplicateRuleMatchRules>
<isActive>true</isActive>
<masterLabel>Residence_Account_Duplicate_Rule</masterLabel>
<operationsOnInsert>Alert</operationsOnInsert>
<operationsOnUpdate>Alert</operationsOnUpdate>
<securityOption>BypassSharingRules</securityOption>
<sortOrder>2</sortOrder>
</DuplicateRule>
57 changes: 57 additions & 0 deletions src/main/default/flows/Update_License_Type.flow-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>61.0</apiVersion>
<environments>Default</environments>
<interviewLabel>Update License Type {!$Flow.CurrentDateTime}</interviewLabel>
<label>Update License Type</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>
<recordUpdates>
<name>Update_License_Type</name>
<label>Update License Type</label>
<locationX>176</locationX>
<locationY>287</locationY>
<inputAssignments>
<field>License_Type_Name1__c</field>
<value>
<elementReference>$Record.LicenseType__r.Name</elementReference>
</value>
</inputAssignments>
<inputReference>$Record</inputReference>
</recordUpdates>
<start>
<locationX>50</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Update_License_Type</targetReference>
</connector>
<object>Account</object>
<recordTriggerType>CreateAndUpdate</recordTriggerType>
<triggerType>RecordBeforeSave</triggerType>
</start>
<status>Active</status>
<variables>
<name>DuplicateWarning</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
</variables>
</Flow>
59 changes: 59 additions & 0 deletions src/main/default/matchingRules/Account.matchingRule-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<MatchingRules xmlns="http://soap.sforce.com/2006/04/metadata">
<matchingRules>
<fullName>Registrant_Account_Matching_Rule</fullName>
<label>Registrant_Account_Matching_Rule</label>
<matchingRuleItems>
<blankValueBehavior>NullNotAllowed</blankValueBehavior>
<fieldName>Name</fieldName>
<matchingMethod>CompanyName</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>NullNotAllowed</blankValueBehavior>
<fieldName>Type</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>BillingPostalCode</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>Phone</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<ruleStatus>Active</ruleStatus>
</matchingRules>
<matchingRules>
<fullName>Residence_Account_Matching_Rule</fullName>
<booleanFilter>(1 AND 2 AND 3 AND 4 AND 5) OR (1 AND 2 AND 4 AND 5)</booleanFilter>
<label>Residence_Account_Matching_Rule</label>
<matchingRuleItems>
<blankValueBehavior>NullNotAllowed</blankValueBehavior>
<fieldName>Name</fieldName>
<matchingMethod>CompanyName</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>HealthAuthority__c</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>Phone</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>NullNotAllowed</blankValueBehavior>
<fieldName>ParentId</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>License_Type_Name1__c</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<ruleStatus>Active</ruleStatus>
</matchingRules>
</MatchingRules>

0 comments on commit faf8353

Please sign in to comment.