binxie
2024-01-22 102afa21c115e8c8b9333a326c3d1af08fe76faf
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
<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
    <fieldUpdates>
        <fullName>Account_Salesdepartment</fullName>
        <field>Account_Salesdepartment__c</field>
        <formula>Account_Salesdepartment_Dept__c</formula>
        <name>更新客户本部</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Assign_Value_to_Salesdepartment_Dept_Txt</fullName>
        <description>文本取公式字段的值</description>
        <field>Salesdepartment_Dept_Txt__c</field>
        <formula>Salesdepartment_Dept__c</formula>
        <name>给销售本部(科室)文本赋值</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Non_Execution_Task</fullName>
        <field>taskStatus__c</field>
        <literalValue>07 未执行</literalValue>
        <name>被动任务未执行</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>UpdateTaskNumber</fullName>
        <field>Task_Number__c</field>
        <formula>CASE(
Salesdepartment_Dept__c ,
&apos;1.华北&apos;, &apos;HB&apos;,
&apos;2.东北&apos;, &apos;DB&apos;,
&apos;3.西北&apos;, &apos;XB&apos;,
&apos;5.华东&apos;, &apos;HD&apos;,
&apos;6.华南&apos;, &apos;HN&apos;,
&apos;4.西南&apos;, &apos;XN&apos;,
&apos;&apos;) &amp; TEXT(YEAR( CreateDate__c )) &amp; IF( LEN( TEXT(MONTH( CreateDate__c )) ) &lt;2 , &apos;0&apos; &amp;TEXT(MONTH( CreateDate__c )) , TEXT(MONTH( CreateDate__c ))) &amp; &apos;-&apos; &amp; Task_No__c</formula>
        <name>更新任务编码</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>account_OCSM</fullName>
        <field>account_OCM__c</field>
        <formula>account_OCM_man_province_HP__c</formula>
        <name>更新客户OCSM</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>assigneeJobCategorytoText</fullName>
        <field>assigneeJobCategory_Text__c</field>
        <formula>Text(assignee__r.Job_Category__c)</formula>
        <name>文本化 被分配者职种</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>updateTaskType</fullName>
        <field>taskTypeFlow__c</field>
        <formula>RecordType.Name</formula>
        <name>修改任务类型</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <rules>
        <fullName>任务类型赋值</fullName>
        <actions>
            <name>updateTaskType</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>ISNEW() || PRIORVALUE(RecordTypeId) != RecordTypeId</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>客户OCSM管理省</fullName>
        <actions>
            <name>account_OCSM</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>account_OCM__c &lt;&gt; account_OCM_man_province_HP__c</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>客户本部</fullName>
        <actions>
            <name>Account_Salesdepartment</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>Account_Salesdepartment__c  &lt;&gt;  Account_Salesdepartment_Dept__c</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>文本化 被分配者职种</fullName>
        <actions>
            <name>assigneeJobCategorytoText</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>ISCHANGED(assignee__c ) || ISNEW()</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>生成任务编码</fullName>
        <actions>
            <name>UpdateTaskNumber</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>ISNEW()  ||  ISBLANK( Task_Number__c )</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>被动任务未执行</fullName>
        <active>true</active>
        <criteriaItems>
            <field>task__c.taskStatus__c</field>
            <operation>equals</operation>
            <value>01 分配</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
        <workflowTimeTriggers>
            <actions>
                <name>Non_Execution_Task</name>
                <type>FieldUpdate</type>
            </actions>
            <offsetFromField>task__c.CreateDate__c</offsetFromField>
            <timeLength>60</timeLength>
            <workflowTimeTriggerUnit>Days</workflowTimeTriggerUnit>
        </workflowTimeTriggers>
    </rules>
    <rules>
        <fullName>销售本部%28科室%29给文本赋值</fullName>
        <actions>
            <name>Assign_Value_to_Salesdepartment_Dept_Txt</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <criteriaItems>
            <field>task__c.CreatedDate</field>
            <operation>notEqual</operation>
        </criteriaItems>
        <description>公式拷文本
SWAG-C5A4E8</description>
        <triggerType>onAllChanges</triggerType>
    </rules>
</Workflow>