Skip to content

Commit

Permalink
Merge pull request #889 from bcgov/feature-ALR-667
Browse files Browse the repository at this point in the history
ALR-667
  • Loading branch information
GandlojuVishwantha authored Jun 21, 2024
2 parents 0688179 + 4551c5b commit 1f0a380
Show file tree
Hide file tree
Showing 9 changed files with 2,184 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Bypass_Duplicates_Check__c</fullName>
<defaultValue>false</defaultValue>
<externalId>false</externalId>
<label>Bypass Duplicates Check</label>
<trackFeedHistory>false</trackFeedHistory>
<trackHistory>false</trackHistory>
<type>Checkbox</type>
</CustomField>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<excludeButtons>DisableCustomerPortalAccount</excludeButtons>
<excludeButtons>DisablePartnerPortalAccount</excludeButtons>
<excludeButtons>IncludeOffline</excludeButtons>
<excludeButtons>Share</excludeButtons>
<excludeButtons>Share</excludeButtons>
<excludeButtons>Submit</excludeButtons>
<layoutSections>
<customLabel>false</customLabel>
Expand Down Expand Up @@ -210,7 +210,7 @@
<actionType>StandardButton</actionType>
<sortOrder>1</sortOrder>
</platformActionListItems>
<platformActionListItems>
<platformActionListItems>
<actionName>NewTask</actionName>
<actionType>QuickAction</actionType>
<sortOrder>2</sortOrder>
Expand Down Expand Up @@ -241,7 +241,7 @@
<quickActionListItems>
<quickActionName>NewEvent</quickActionName>
</quickActionListItems>
</quickActionList>
</quickActionList>
<relatedLists>
<fields>Location</fields>
<fields>ActiveFrom</fields>
Expand All @@ -263,12 +263,13 @@
<fields>CONTACT.FULL_NAME</fields>
<fields>ACCCONRELATION.ROLES</fields>
<fields>PrimaryContact__c</fields>
<fields>ACCCONRELATION.IS_ACTIVE</fields>
<fields>CONTACT.EMAIL</fields>
<fields>CONTACT.PHONE1</fields>
<relatedList>RelatedAccountContactRelationList</relatedList>
<relatedList>RelatedAccountContactRelationList</relatedList>
</relatedLists>
<relatedLists>
<fields>FULL_NAME</fields>
<fields>FULL_NAME</fields>
<fields>CONTACT.TITLE</fields>
<fields>CONTACT.EMAIL</fields>
<fields>CONTACT.PHONE1</fields>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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>A Contact already exists with this information. Click Save to continue or cancel to abandon your changes</alertText>
<description xsi:nil="true"/>
<duplicateRuleFilter>
<booleanFilter xsi:nil="true"/>
<duplicateRuleFilterItems>
<field>Bypass_Duplicates_Check__c</field>
<operation>equals</operation>
<value>false</value>
<sortOrder>1</sortOrder>
<table>Contact</table>
</duplicateRuleFilterItems>
</duplicateRuleFilter>
<duplicateRuleMatchRules>
<matchRuleSObjectType>Contact</matchRuleSObjectType>
<matchingRule>Contact_Matching_Rule</matchingRule>
<objectMapping xsi:nil="true"/>
</duplicateRuleMatchRules>
<isActive>true</isActive>
<masterLabel>Contact_Duplicate_Rule</masterLabel>
<operationsOnInsert>Alert</operationsOnInsert>
<operationsOnInsert>Report</operationsOnInsert>
<operationsOnUpdate>Alert</operationsOnUpdate>
<operationsOnUpdate>Report</operationsOnUpdate>
<securityOption>BypassSharingRules</securityOption>
<sortOrder>3</sortOrder>
</DuplicateRule>
34 changes: 34 additions & 0 deletions src/main/default/matchingRules/Contact.matchingRule-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<MatchingRules xmlns="http://soap.sforce.com/2006/04/metadata">
<matchingRules>
<fullName>Contact_Matching_Rule</fullName>
<booleanFilter>(1 AND 5 AND 2) OR (1 AND 5 AND 3) OR (1 AND 5 AND 4)</booleanFilter>
<label>Contact_Matching_Rule</label>
<matchingRuleItems>
<blankValueBehavior>NullNotAllowed</blankValueBehavior>
<fieldName>LastName</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>Email</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>MobilePhone</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>MatchBlanks</blankValueBehavior>
<fieldName>Phone</fieldName>
<matchingMethod>Exact</matchingMethod>
</matchingRuleItems>
<matchingRuleItems>
<blankValueBehavior>NullNotAllowed</blankValueBehavior>
<fieldName>FirstName</fieldName>
<matchingMethod>FirstName</matchingMethod>
</matchingRuleItems>
<ruleStatus>Active</ruleStatus>
</matchingRules>
</MatchingRules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>CheckPrimaryContact</fullName>
<active>true</active>
<errorConditionFormula>AND( NOT( $Permission.EHISBypassValidationRuleCustomPermission ),IsActive = False,
PrimaryContact__c = True )</errorConditionFormula>
<errorMessage>Primary Contact must be active, please select Active or uncheck this contact as Primary.</errorMessage>
</ValidationRule>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<active>false</active>
<assignmentRulesUsed>false</assignmentRulesUsed>
<deletedOnSuccess>false</deletedOnSuccess>
<errorIgnored>false</errorIgnored>
<errorIgnored>true</errorIgnored>
<expectedInputJson>{
&quot;ContextId&quot; : &quot;001Aq00000Nl1hsIAB&quot;,
&quot;omniscriptId&quot; : &quot;0jNAq000000Mul7MAC&quot;,
Expand Down Expand Up @@ -49,7 +49,7 @@
<fieldLevelSecurityEnabled>false</fieldLevelSecurityEnabled>
<inputType>JSON</inputType>
<name>DRCreateAccountContactRelation</name>
<nullInputsIncludedInOutput>false</nullInputsIncludedInOutput>
<nullInputsIncludedInOutput>true</nullInputsIncludedInOutput>
<omniDataTransformItem>
<disabled>true</disabled>
<filterGroup>0.0</filterGroup>
Expand Down Expand Up @@ -248,6 +248,20 @@
<requiredForUpsert>false</requiredForUpsert>
<upsertKey>false</upsertKey>
</omniDataTransformItem>
<omniDataTransformItem>
<defaultValue>false</defaultValue>
<disabled>false</disabled>
<filterGroup>0.0</filterGroup>
<globalKey>DRCreateAccountContactRelationCustom5732</globalKey>
<inputObjectQuerySequence>0.0</inputObjectQuerySequence>
<linkedObjectSequence>0.0</linkedObjectSequence>
<name>DRCreateAccountContactRelation</name>
<outputCreationSequence>1.0</outputCreationSequence>
<outputFieldName>Bypass_Duplicates_Check__c</outputFieldName>
<outputObjectName>Contact</outputObjectName>
<requiredForUpsert>false</requiredForUpsert>
<upsertKey>false</upsertKey>
</omniDataTransformItem>
<omniDataTransformItem>
<disabled>false</disabled>
<filterGroup>0.0</filterGroup>
Expand All @@ -272,7 +286,7 @@
&quot;sId&quot; : &quot;0jNAq000000Mul7MAC&quot;,
&quot;theme&quot; : &quot;lightning&quot;,
&quot;subType&quot; : &quot;AccountContactRelation&quot;,
&quot;timeStamp&quot; : &quot;2024-05-22T08:48:19.416Z&quot;,
&quot;timeStamp&quot; : &quot;2024-05-22T09:26:59.437Z&quot;,
&quot;userProfile&quot; : &quot;System Administrator&quot;,
&quot;userTimeZoneName&quot; : &quot;Asia/Kolkata&quot;,
&quot;userTimeZone&quot; : &quot;330&quot;,
Expand All @@ -283,28 +297,31 @@
&quot;localTimeZoneName&quot; : &quot;Asia/Calcutta&quot;,
&quot;Error&quot; : null,
&quot;Create ACR&quot; : {
&quot;Contact&quot; : &quot;Existing Contact&quot;
&quot;Contact&quot; : &quot;New Contact&quot;
},
&quot;AccountId&quot; : &quot;001Aq00000Nl1hsIAB&quot;,
&quot;Contact Details&quot; : {
&quot;Block1&quot; : {
&quot;TypeAhead1-Block&quot; : {
&quot;TypeAhead1&quot; : &quot;keerthana sri&quot;,
&quot;Name&quot; : &quot;keerthana sri&quot;,
&quot;Id&quot; : &quot;003Aq00000PN4HXIA1&quot;
}
&quot;Block1&quot; : null,
&quot;Block4&quot; : {
&quot;Salutation&quot; : &quot;Mr.&quot;,
&quot;FirstName&quot; : &quot;kumar&quot;,
&quot;LastName&quot; : &quot;Kangan&quot;,
&quot;Phone&quot; : &quot;1234567890&quot;,
&quot;Mobile&quot; : &quot;0987654321&quot;,
&quot;Email&quot; : &quot;[email protected]&quot;
},
&quot;Block4&quot; : null,
&quot;Roles&quot; : &quot;Main Site Manager;General manager;Administrative Personnel;Registrant Secondary Contact;Nurse / Care Manager&quot;,
&quot;Roles3&quot; : &quot;Secondary Site Manager;Director of Wellness;Director;CEO&quot;,
&quot;Roles&quot; : &quot;Main Site Manager;General manager&quot;,
&quot;Roles3&quot; : &quot;Secondary Site Manager;Assistant manager;Registrant Main Contact&quot;,
&quot;Active&quot; : true,
&quot;Primary Contact&quot; : true,
&quot;AccountName&quot; : &quot;Residence 2&quot;
}
},
&quot;DRId_Contact&quot; : &quot;003Aq00000TakYLIAZ&quot;,
&quot;DRId_AccountContactRelation&quot; : &quot;07kAq00000Ao0K1IAJ&quot;
}</previewJsonData>
<processSuperBulk>false</processSuperBulk>
<responseCacheTtlMinutes>0.0</responseCacheTtlMinutes>
<rollbackOnError>true</rollbackOnError>
<rollbackOnError>false</rollbackOnError>
<sourceObject>json</sourceObject>
<sourceObjectDefault>false</sourceObjectDefault>
<synchronousProcessThreshold>0.0</synchronousProcessThreshold>
Expand Down
Loading

0 comments on commit 1f0a380

Please sign in to comment.