From 4688e276eee13cd2e521aa55afb5725cb0fda270 Mon Sep 17 00:00:00 2001
From: binxie <137736985@qq.com>
Date: 星期一, 22 一月 2024 21:21:18 +0800
Subject: [PATCH] backuprentalapply0122

---
 force-app/main/default/workflows/Lead.workflow-meta.xml |  410 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 410 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/workflows/Lead.workflow-meta.xml b/force-app/main/default/workflows/Lead.workflow-meta.xml
new file mode 100644
index 0000000..b30ef6d
--- /dev/null
+++ b/force-app/main/default/workflows/Lead.workflow-meta.xml
@@ -0,0 +1,410 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
+    <alerts>
+        <fullName>SendMailToLeadOwner</fullName>
+        <description>璐拱鎰忓悜鑷姩鍒嗛厤閭欢</description>
+        <protected>false</protected>
+        <recipients>
+            <type>owner</type>
+        </recipients>
+        <senderAddress>lu_liu@olympus.com.cn</senderAddress>
+        <senderType>OrgWideEmailAddress</senderType>
+        <template>Lead/SendMailToLeadOwner</template>
+    </alerts>
+    <fieldUpdates>
+        <fullName>Account_Salesdepartment</fullName>
+        <description>銉兗銉夈伄銆岃ê鐧傜-鏈儴銆嶃倰鏇存柊</description>
+        <field>Account_Salesdepartment__c</field>
+        <formula>IF(Hospital_Name__r.RecordTypeId = &apos;01210000000QemG&apos;, 
+  Hospital_Name__r.Salesdepartment_HP__c,
+IF(Hospital_Name__r.Parent.RecordTypeId = &apos;01210000000QemG&apos;,
+  Hospital_Name__r.Parent.Salesdepartment_HP__c,
+  Hospital_Name__r.Parent.Parent.Salesdepartment_HP__c
+))</formula>
+        <name>銉兗銉夈伄銆岃ê鐧傜-鏈儴銆嶈ō瀹�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Assign_to_LeadSource</fullName>
+        <description>璇鹃锛歋WAG-C4H99E</description>
+        <field>LeadSource</field>
+        <literalValue>瀛︿細浼氳</literalValue>
+        <name>鏉ユ簮鍙栧��</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Literal</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Lead_Company_Set_DeptName</fullName>
+        <field>Company</field>
+        <formula>Hospital_Name__r.Name</formula>
+        <name>娼滃湪瀹㈡埛鍏徃 = 绉戝鍚�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Lead_NoCreat</fullName>
+        <field>Lead_No__c</field>
+        <formula>&apos;IN&apos; + &apos;-&apos; + Account_Province__c + &quot;-&quot; + Lead_NoDate__c + Lead_Num__c</formula>
+        <name>鎰忓悜缂栫爜浣滄垚</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>OSCM_Province_cus</fullName>
+        <field>OCM_man_province_cus_txt__c</field>
+        <formula>OCM_man_province_cus__c</formula>
+        <name>OSCM绠$悊鐪�(瀹㈡埛)鏇存柊</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Owner_Dep_Update</fullName>
+        <field>Owner_Dep_txt__c</field>
+        <formula>Owner_Dep__c</formula>
+        <name>閿�鍞湰閮�(鎵�鏈変汉)鏂囨湰鏇存柊</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>RecordLeadCreatorJobCategory</fullName>
+        <field>JobCategoryOfCreator__c</field>
+        <formula>TEXT($User.Job_Category__c)</formula>
+        <name>璁板綍鎰忓悜鍒涘缓浜鸿亴绉�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Seting_Account_for_search</fullName>
+        <field>Account_for_search__c</field>
+        <formula>Hospital_Name__r.Name</formula>
+        <name>璁惧畾-瀹㈡埛鍚嶏紙妫�绱㈢敤锛�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>UpdateMethod1</fullName>
+        <field>Sales_Method__c</field>
+        <literalValue>鏀垮簻鎷涙爣</literalValue>
+        <name>UpdateMethod1</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Literal</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Update_Company</fullName>
+        <field>Company</field>
+        <formula>Hospital_Name__r.Name</formula>
+        <name>鏇存柊瀹㈡埛鍚�(鎵嬪姩)</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Update_Contact_FN</fullName>
+        <field>FirstName</field>
+        <formula>Contact_Name__r.FirstName</formula>
+        <name>鏇存柊鍚�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Update_Contact_LN</fullName>
+        <field>LastName</field>
+        <formula>Contact_Name__r.LastName</formula>
+        <name>鏇存柊濮�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Update_Leads_Account_State</fullName>
+        <field>Account_State__c</field>
+        <formula>IF(Hospital_Name__r.RecordTypeId = &apos;01210000000QemG&apos;, 
+  Hospital_Name__r.State_Master__r.Name,  
+IF(Hospital_Name__r.Parent.RecordTypeId = &apos;01210000000QemG&apos;,
+  Hospital_Name__r.Parent.State_Master__r.Name,
+  Hospital_Name__r.Parent.Parent.State_Master__r.Name
+))</formula>
+        <name>銉兗銉夈伄銆岃ê鐧傜-鐪併�嶃倰鏇存柊</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>Update_Leads_Job_Category</fullName>
+        <field>Creator_Job_Category__c</field>
+        <formula>text( Owner:User.Job_Category__c)</formula>
+        <name>銉兗銉夈伄銆屼綔鎴愯��-鑱风ó銆嶃倰鏇存柊</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>autoset_lead_forecasted</fullName>
+        <field>Close_Forecasted_Date__c</field>
+        <formula>CreatedDate + 75</formula>
+        <name>鎰忓悜璁剧疆棰勬祴绛剧害鏃�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>record_begin_opp_date</fullName>
+        <field>begin_opp_date__c</field>
+        <formula>TODAY()</formula>
+        <name>璁板綍寮�濮嬭浠锋椂闂�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>record_have_opp_date</fullName>
+        <field>have_opp_date__c</field>
+        <formula>TODAY()</formula>
+        <name>璁板綍宸叉湁璇环鏃堕棿</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <fieldUpdates>
+        <fullName>record_no_need_date</fullName>
+        <field>no_need_date__c</field>
+        <formula>TODAY()</formula>
+        <name>璁板綍鏃犻渶姹傛椂闂�</name>
+        <notifyAssignee>false</notifyAssignee>
+        <operation>Formula</operation>
+        <protected>false</protected>
+        <reevaluateOnChange>false</reevaluateOnChange>
+    </fieldUpdates>
+    <rules>
+        <fullName>OCSM绠$悊鐪�%28瀹㈡埛%29鏂囨湰鏇存柊</fullName>
+        <actions>
+            <name>OSCM_Province_cus</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <formula>OR(ISNEW(), ISCHANGED( OCM_man_province_cus__c ), NOT(ISCHANGED( OCM_man_province_cus__c )))</formula>
+        <triggerType>onAllChanges</triggerType>
+    </rules>
+    <rules>
+        <fullName>RecordCreatorJobCategory</fullName>
+        <actions>
+            <name>RecordLeadCreatorJobCategory</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <description>褰撴柊寤烘剰鍚戞椂锛岃褰曞垱寤轰汉鐨勮亴绉�</description>
+        <formula>TRUE</formula>
+        <triggerType>onCreateOnly</triggerType>
+    </rules>
+    <rules>
+        <fullName>record_first_state_day</fullName>
+        <actions>
+            <name>record_begin_opp_date</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <criteriaItems>
+            <field>Lead.Status</field>
+            <operation>equals</operation>
+            <value>纰鸿獚娓堛伩</value>
+        </criteriaItems>
+        <triggerType>onCreateOrTriggeringUpdate</triggerType>
+    </rules>
+    <rules>
+        <fullName>record_second_state_day</fullName>
+        <actions>
+            <name>record_no_need_date</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <criteriaItems>
+            <field>Lead.Status</field>
+            <operation>equals</operation>
+            <value>涓嶈</value>
+        </criteriaItems>
+        <triggerType>onCreateOrTriggeringUpdate</triggerType>
+    </rules>
+    <rules>
+        <fullName>record_third_state_day</fullName>
+        <actions>
+            <name>record_have_opp_date</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <criteriaItems>
+            <field>Lead.Status</field>
+            <operation>equals</operation>
+            <value>涓嶇敤(閲嶅)</value>
+        </criteriaItems>
+        <triggerType>onCreateOrTriggeringUpdate</triggerType>
+    </rules>
+    <rules>
+        <fullName>銉兗銉�-姣庡洖瀹熻鍏紡鍙樻垚鍒版枃鏈�</fullName>
+        <actions>
+            <name>Account_Salesdepartment</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <actions>
+            <name>Seting_Account_for_search</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <actions>
+            <name>Update_Leads_Account_State</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <actions>
+            <name>Update_Leads_Job_Category</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <formula>true</formula>
+        <triggerType>onAllChanges</triggerType>
+    </rules>
+    <rules>
+        <fullName>涓昏瀛︿細鏈夊��%EF%BC%8C鏉ユ簮榛樿涓哄浼氫細璁�</fullName>
+        <actions>
+            <name>Assign_to_LeadSource</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <description>涓昏瀛︿細鍏宠仈浜嗕細璁椂锛岀郴缁熻嚜鍔ㄩ粯璁ゆ潵婧�=瀛︿細浼氳
+璇鹃锛歋WAG-C4H99E</description>
+        <formula>!ISBLANK(Campaign__c)</formula>
+        <triggerType>onAllChanges</triggerType>
+    </rules>
+    <rules>
+        <fullName>瀹㈡埛鍚嶇敓鍚屾</fullName>
+        <actions>
+            <name>Update_Company</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <actions>
+            <name>Update_Contact_FN</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <actions>
+            <name>Update_Contact_LN</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <formula>AND(Not(isnull(Hospital_Name__c)),Not(isnull(Contact_Name__c)),Not(isblank(Hospital_Name__c)),Not(isblank(Contact_Name__c)))</formula>
+        <triggerType>onAllChanges</triggerType>
+    </rules>
+    <rules>
+        <fullName>鎰忓悜缂栫爜鑷姩鐢熶骇</fullName>
+        <actions>
+            <name>Lead_NoCreat</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <formula>True</formula>
+        <triggerType>onCreateOnly</triggerType>
+    </rules>
+    <rules>
+        <fullName>鏂板缓璐拱鎰忓悜</fullName>
+        <actions>
+            <name>Lead_Company_Set_DeptName</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <criteriaItems>
+            <field>Lead.Company</field>
+            <operation>equals</operation>
+            <value>*</value>
+        </criteriaItems>
+        <triggerType>onCreateOnly</triggerType>
+    </rules>
+    <rules>
+        <fullName>鏈窡杩涘畬姣曠殑璐拱鎰忓悜</fullName>
+        <active>true</active>
+        <booleanFilter>1</booleanFilter>
+        <criteriaItems>
+            <field>Lead.Status</field>
+            <operation>contains</operation>
+            <value>璺熻繘涓�,鏈⒑瑾�</value>
+        </criteriaItems>
+        <description>鐘舵�佷负&quot;鏈窡杩�&quot;&quot;璺熻繘涓�&quot;鐨勬剰鍚�.</description>
+        <triggerType>onCreateOrTriggeringUpdate</triggerType>
+        <workflowTimeTriggers>
+            <offsetFromField>Lead.CreatedDate</offsetFromField>
+            <timeLength>3</timeLength>
+            <workflowTimeTriggerUnit>Days</workflowTimeTriggerUnit>
+        </workflowTimeTriggers>
+    </rules>
+    <rules>
+        <fullName>璁剧疆棰勬祴绛剧害鏃�</fullName>
+        <actions>
+            <name>autoset_lead_forecasted</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <formula>ISNULL(Close_Forecasted_Date__c )|| (Close_Forecasted_Date__c &lt; DATEVALUE(CreatedDate)+75 &amp;&amp; ET_Check__c==false)</formula>
+        <triggerType>onAllChanges</triggerType>
+    </rules>
+    <rules>
+        <fullName>閭欢鍒嗛厤缁欒喘涔版剰鍚戞墍鏈変汉</fullName>
+        <actions>
+            <name>SendMailToLeadOwner</name>
+            <type>Alert</type>
+        </actions>
+        <active>true</active>
+        <criteriaItems>
+            <field>Lead.SendMailToOwner__c</field>
+            <operation>equals</operation>
+            <value>鐪�</value>
+        </criteriaItems>
+        <triggerType>onCreateOnly</triggerType>
+    </rules>
+    <rules>
+        <fullName>閿�鍞湰閮�%EF%BC%88鎵�鏈変汉%EF%BC%89鏂囨湰鏇存柊</fullName>
+        <actions>
+            <name>Owner_Dep_Update</name>
+            <type>FieldUpdate</type>
+        </actions>
+        <active>true</active>
+        <formula>OR(ISNEW(), ISCHANGED( Owner_Dep__c ), NOT(ISCHANGED( Owner_Dep__c )))</formula>
+        <triggerType>onAllChanges</triggerType>
+    </rules>
+    <tasks>
+        <fullName>Not_follow_up_Sales_lead</fullName>
+        <assignedToType>owner</assignedToType>
+        <description>鍏堢敓/濂冲+: 
+
+鎮ㄦ湁鏈窡杩涘畬姣曠殑璐拱鎰忓悜,璇锋墦寮�SalesForce&quot;璐拱鎰忓悜&quot;閫夐」鍗¤繘琛岃窡杩涘鐞�,璋㈣阿!</description>
+        <dueDateOffset>4</dueDateOffset>
+        <notifyAssignee>true</notifyAssignee>
+        <offsetFromField>Lead.CreatedDate</offsetFromField>
+        <priority>楂�</priority>
+        <protected>false</protected>
+        <status>鏈潃鎵�</status>
+        <subject>鏈窡杩涘畬姣曠殑璐拱鎰忓悜</subject>
+    </tasks>
+</Workflow>

--
Gitblit v1.9.1