<?xml version="1.0" encoding="UTF-8"?>
|
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fieldUpdates>
|
<fullName>AutoAddProductSetCD</fullName>
|
<field>Product_Set_CD__c</field>
|
<formula>CASE(TEXT(Applicable_Department__c)
|
,'消化科','GI-'+Auto_Product_Set_CD__c
|
,'呼吸科','BF-'+Auto_Product_Set_CD__c
|
,'普外科','GS-'+Auto_Product_Set_CD__c
|
,'泌尿科','URO-'+Auto_Product_Set_CD__c
|
,'妇科','GYN-'+Auto_Product_Set_CD__c
|
,'耳鼻喉科','ENT-'+Auto_Product_Set_CD__c
|
,'能量','ENG-'+Auto_Product_Set_CD__c
|
,'SI','SI-'+Auto_Product_Set_CD__c
|
,'外科通用','SP-'+Auto_Product_Set_CD__c
|
,Auto_Product_Set_CD__c
|
)</formula>
|
<name>生成配套编码</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<fieldUpdates>
|
<fullName>Update_Valid</fullName>
|
<field>Valid_text__c</field>
|
<formula>IF(Valid_Status__c = true, 1, 0)</formula>
|
<name>更新产品配套状态</name>
|
<notifyAssignee>false</notifyAssignee>
|
<operation>Formula</operation>
|
<protected>false</protected>
|
<reevaluateOnChange>false</reevaluateOnChange>
|
</fieldUpdates>
|
<rules>
|
<fullName>自动生成配套编码</fullName>
|
<actions>
|
<name>AutoAddProductSetCD</name>
|
<type>FieldUpdate</type>
|
</actions>
|
<active>true</active>
|
<formula>ISNEW() || ISCHANGED(Product_Set_CD__c) || ISCHANGED(Applicable_Department__c)</formula>
|
<triggerType>onAllChanges</triggerType>
|
</rules>
|
<rules>
|
<fullName>设定-产品配套状态</fullName>
|
<actions>
|
<name>Update_Valid</name>
|
<type>FieldUpdate</type>
|
</actions>
|
<active>true</active>
|
<formula>true</formula>
|
<triggerType>onAllChanges</triggerType>
|
</rules>
|
</Workflow>
|