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
<?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)
    ,&apos;消化科&apos;,&apos;GI-&apos;+Auto_Product_Set_CD__c
    ,&apos;呼吸科&apos;,&apos;BF-&apos;+Auto_Product_Set_CD__c
    ,&apos;普外科&apos;,&apos;GS-&apos;+Auto_Product_Set_CD__c
    ,&apos;泌尿科&apos;,&apos;URO-&apos;+Auto_Product_Set_CD__c
    ,&apos;妇科&apos;,&apos;GYN-&apos;+Auto_Product_Set_CD__c
    ,&apos;耳鼻喉科&apos;,&apos;ENT-&apos;+Auto_Product_Set_CD__c
    ,&apos;能量&apos;,&apos;ENG-&apos;+Auto_Product_Set_CD__c
    ,&apos;SI&apos;,&apos;SI-&apos;+Auto_Product_Set_CD__c
    ,&apos;外科通用&apos;,&apos;SP-&apos;+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>