binxie
2024-01-20 2ff0f0a7ab276c3466d9e06e14222db802194efc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
    <fieldUpdates>
        <fullName>COPY_Employee_No</fullName>
        <field>Employee_No_manual__c</field>
        <formula>User__r.Employee_No__c</formula>
        <name>社内员工_员工号码COPY</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>COPY_Work_Location</fullName>
        <field>Work_Location_manual__c</field>
        <formula>TEXT(User__r.Work_Location__c)</formula>
        <name>社内员工_工作地COPY</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>COPY_email_address</fullName>
        <field>Email</field>
        <formula>User__r.Email</formula>
        <name>社内员工_电子邮件COPY</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>COPY_mobile</fullName>
        <field>MobilePhone</field>
        <formula>User__r.Mobile_Phone__c</formula>
        <name>社内员工_手机号码COPY</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Create_Customer_FulllName</fullName>
        <field>MedicalStaff_Full_name__c</field>
        <formula>LastName + FirstName</formula>
        <name>新建客户人员的姓名</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Dept_change_to_text</fullName>
        <field>Dept_text__c</field>
        <formula>text(dept__c)</formula>
        <name>本部-更新到文本</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Enter_date</fullName>
        <field>Hire_date_text__c</field>
        <formula>Hire_Date__c</formula>
        <name>社内员工-入职日Copy</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Follow_stateUpdateDate</fullName>
        <field>Follow_stateUpdate__c</field>
        <formula>today()</formula>
        <name>记录跟进状态更新日期</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>IsEndoscopeUpdateDate</fullName>
        <field>IsEndoscopeUpdate__c</field>
        <formula>today()</formula>
        <name>记录是否负责内镜工作更新日期</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>JobStatusUpdateDate</fullName>
        <description>服务技师培训项目更新岗位状态更新日期</description>
        <field>JobStatusUpdateDate__c</field>
        <formula>Today()</formula>
        <name>记录岗位状态更新日期</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>UniqueNumber</fullName>
        <field>UniqueNumber__c</field>
        <formula>MobilePhone</formula>
        <name>经销商客户人员手机号唯一验证</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>UniqueNumberIsNULL</fullName>
        <field>UniqueNumber__c</field>
        <name>经销商客户人员手机号唯一验证清空</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Null</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Update_staff_dept</fullName>
        <field>Dept_text__c</field>
        <formula>TEXT(User__r.Dept__c)</formula>
        <name>社内员工-本部Copy</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>gender_copy</fullName>
        <field>Gender_text__c</field>
        <formula>Gender__c</formula>
        <name>社内员工-性别Copy</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <rules>
        <fullName>Conbined_staff_name_to_FullName</fullName>
        <actions>
            <name>Create_Customer_FulllName</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <description>使用工作流程,新建姓名(姓+名)</description>
        <formula>True&amp;&amp;  $User.Id!= $Label.ByPassTrigger</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>保存岗位状态更新日期</fullName>
        <actions>
            <name>JobStatusUpdateDate</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <description>服务技师培训项目更新岗位状态时自动记录下更新日期</description>
        <formula>$User.Id!= $Label.ByPassTrigger&amp;&amp;Campaign__c !=null &amp;&amp; Campaign__r.RecordType.DeveloperName = &apos;ServiceEngineerTraining&apos; &amp;&amp; Text(OnJobState__c) != null &amp;&amp; (ISNew()|| (ISCHANGED(OnJobState__c) ))</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>保存是否负责内镜工作更新日期</fullName>
        <actions>
            <name>IsEndoscopeUpdateDate</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <description>保存是否负责内镜工作更新日期</description>
        <formula>$User.Id!= $Label.ByPassTrigger&amp;&amp;Campaign__c !=null &amp;&amp; Campaign__r.RecordType.DeveloperName = &apos;ServiceEngineerTraining&apos; &amp;&amp; Text(IsEndoscope__c) != null &amp;&amp; (ISNew()|| (ISCHANGED(IsEndoscope__c) ))</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>保存跟进状态更新日期</fullName>
        <actions>
            <name>Follow_stateUpdateDate</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>$User.Id!= $Label.ByPassTrigger&amp;&amp;Campaign__c !=null &amp;&amp; Campaign__r.RecordType.DeveloperName = &apos;ServiceEngineerTraining&apos; &amp;&amp; Text(Follow_state__c) != null &amp;&amp; (ISNew()|| (ISCHANGED(Follow_state__c) ))</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>客户人员手机号唯一验证清空</fullName>
        <actions>
            <name>UniqueNumberIsNULL</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <description>客户人员手机号唯一验证清空(在线市场活动)
客户人员无效:
将唯一字段清空</description>
        <formula>AND(
OR(RecordType.DeveloperName = &apos;Agency&apos;,RecordType.DeveloperName = &apos;Doctor&apos;),
ISCHANGED(Isactive__c),
OR(TEXT(Isactive__c) =&apos;无效(退休)&apos;,TEXT(Isactive__c) =&apos;无效(重复)&apos;)
)</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>客户人员手机号唯一验证赋值</fullName>
        <actions>
            <name>UniqueNumber</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <description>手机号重复验证-经销商客户人员和医院客户人员(在线市场活动)
客户人员有效:
新增客户人员并且手机号码有值,将手机号赋值给唯一字段
更新客户人员手机号,将手机号赋值给唯一字段</description>
        <formula>AND(
    OR(RecordType.DeveloperName = &apos;Agency&apos;,RecordType.DeveloperName = &apos;Doctor&apos;),
    OR(ISNEW() &amp;&amp; NOT(ISBLANK(MobilePhone)) &amp;&amp; NOT(ISNULL(MobilePhone)), ISCHANGED(MobilePhone),
                TEXT(Isactive__c) =&apos;有效&apos;)
 
)</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>更新 社内员工信息</fullName>
        <actions>
            <name>Dept_change_to_text</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <formula>AND(RecordTypeId =&quot;01210000000Qtky&quot;,ISBLANK( User__c), TRUE)</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>社内用户 邮箱地址COPY</fullName>
        <actions>
            <name>COPY_Employee_No</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>COPY_Work_Location</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>COPY_email_address</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>COPY_mobile</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>Enter_date</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>Update_staff_dept</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>gender_copy</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <criteriaItems>
            <field>Contact.RecordTypeId</field>
            <operation>equals</operation>
            <value>社内员工</value>
        </criteriaItems>
        <criteriaItems>
            <field>Contact.User__c</field>
            <operation>notEqual</operation>
        </criteriaItems>
        <criteriaItems>
            <field>Contact.Active__c</field>
            <operation>equals</operation>
            <value>使用中</value>
        </criteriaItems>
        <triggerType>onAllChanges</triggerType>
    </rules>
</Workflow>