<?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 ,
|
'1.华北', 'HB',
|
'2.东北', 'DB',
|
'3.西北', 'XB',
|
'5.华东', 'HD',
|
'6.华南', 'HN',
|
'4.西南', 'XN',
|
'') & TEXT(YEAR( CreateDate__c )) & IF( LEN( TEXT(MONTH( CreateDate__c )) ) <2 , '0' &TEXT(MONTH( CreateDate__c )) , TEXT(MONTH( CreateDate__c ))) & '-' & 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 <> 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 <> 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>
|