<?xml version="1.0" encoding="UTF-8"?>
|
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
|
<alerts>
|
<fullName>Inspection_report_approved</fullName>
|
<description>点检报告书批准通知</description>
|
<protected>false</protected>
|
<recipients>
|
<field>Reporter__c</field>
|
<type>userLookup</type>
|
</recipients>
|
<senderType>CurrentUser</senderType>
|
<template>Inspection/Inspection_report_approved</template>
|
</alerts>
|
<alerts>
|
<fullName>Inspection_report_decline</fullName>
|
<description>点检申请书驳回通知</description>
|
<protected>false</protected>
|
<recipients>
|
<field>Reporter__c</field>
|
<type>userLookup</type>
|
</recipients>
|
<senderType>CurrentUser</senderType>
|
<template>Inspection/Inspection_report_decline</template>
|
</alerts>
|
<fieldUpdates>
|
<fullName>Change_to_complete_filed</fullName>
|
<field>Status__c</field>
|
<literalValue>填写完毕</literalValue>
|
<name>状态修改到填写完毕</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Literal</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>Input_submit_date</fullName>
|
<field>Submit_date__c</field>
|
<formula>today()</formula>
|
<name>更新:申请日</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>Set_draft</fullName>
|
<field>Status__c</field>
|
<literalValue>草案中</literalValue>
|
<name>状态修改到草案中</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Literal</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>Status_change_submit</fullName>
|
<field>Status__c</field>
|
<literalValue>申请中</literalValue>
|
<name>状态:申请中</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Literal</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>Update_approved_date</fullName>
|
<field>Approved_date__c</field>
|
<formula>today()</formula>
|
<name>更新:批准日</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>change_approved</fullName>
|
<field>Status__c</field>
|
<literalValue>批准</literalValue>
|
<name>设定:改到批准</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Literal</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>request_day_blank</fullName>
|
<field>Submit_date__c</field>
|
<name>申请日:空</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Null</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>set_InspectionName</fullName>
|
<field>Name</field>
|
<formula>IF(Name = '*',"OCSM-" & MID(Text(Today()), 3, 2) & "-" & RIGHT(Name_AutoNumber__c, 5),Name)</formula>
|
<name>自动编码=>Name</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>set_InspectionNameUnique</fullName>
|
<field>Name_Unique__c</field>
|
<formula>IF(Name = '*',"OCSM-" & MID(Text(Today()), 3, 2) & "-" & RIGHT(Name_AutoNumber__c, 5),Name)</formula>
|
<name>自动编码=>Name_Unique</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>set_InspectionNameUnique2</fullName>
|
<field>Name_Unique__c</field>
|
<formula>Name</formula>
|
<name>Name=>Name_Unique</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<rules>
|
<fullName>手动-点检报告书单号</fullName>
|
<actions>
|
<name>set_InspectionNameUnique2</name>
|
<type>FieldUpdate</type>
|
</actions>
|
<active>true</active>
|
<formula>Name_Manual__c && ISCHANGED(Name)</formula>
|
<triggerType>onAllChanges</triggerType>
|
</rules>
|
<rules>
|
<fullName>状态修改到填写完毕</fullName>
|
<actions>
|
<name>Change_to_complete_filed</name>
|
<type>FieldUpdate</type>
|
</actions>
|
<active>false</active>
|
<criteriaItems>
|
<field>Inspection_Report__c.Responsible_Person__c</field>
|
<operation>notEqual</operation>
|
</criteriaItems>
|
<criteriaItems>
|
<field>Inspection_Report__c.Manual_Department__c</field>
|
<operation>notEqual</operation>
|
</criteriaItems>
|
<criteriaItems>
|
<field>Inspection_Report__c.phone__c</field>
|
<operation>notEqual</operation>
|
</criteriaItems>
|
<criteriaItems>
|
<field>Inspection_Report__c.Inspection_Date__c</field>
|
<operation>notEqual</operation>
|
</criteriaItems>
|
<criteriaItems>
|
<field>Inspection_Report__c.Status__c</field>
|
<operation>equals</operation>
|
<value>草案中</value>
|
</criteriaItems>
|
<triggerType>onAllChanges</triggerType>
|
</rules>
|
<rules>
|
<fullName>自动编码-点检报告书单号</fullName>
|
<actions>
|
<name>set_InspectionName</name>
|
<type>FieldUpdate</type>
|
</actions>
|
<actions>
|
<name>set_InspectionNameUnique</name>
|
<type>FieldUpdate</type>
|
</actions>
|
<active>true</active>
|
<formula>True</formula>
|
<triggerType>onCreateOnly</triggerType>
|
</rules>
|
</Workflow>
|