binxie
2024-01-18 22bd41f13147fce1df6ff35b592720c9cb387de9
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
<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
    <alerts>
        <fullName>SubAuthorizedApprovalOrNotEmailAlert</fullName>
        <description>转授权申请批准通过邮件提醒</description>
        <protected>false</protected>
        <recipients>
            <type>owner</type>
        </recipients>
        <recipients>
            <recipient>chunxia_gao@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>ling_zhu@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <senderAddress>ocm_te2ampj@olympus.com.cn</senderAddress>
        <senderType>OrgWideEmailAddress</senderType>
        <template>SubAuthorized/SubAuthorizedApprovalDone</template>
    </alerts>
    <alerts>
        <fullName>SubAuthorizedApprovalProcessEmailAlert</fullName>
        <description>转授权申请邮件提醒</description>
        <protected>false</protected>
        <recipients>
            <type>owner</type>
        </recipients>
        <recipients>
            <recipient>chunxia_gao@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>ling_zhu@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <senderType>DefaultWorkflowUser</senderType>
        <template>SubAuthorized/SubAuthorizedApproval</template>
    </alerts>
    <alerts>
        <fullName>SubAuthorizedApprovaleeEmailAlert</fullName>
        <description>转授权申请批准通过邮件提醒授权人</description>
        <protected>false</protected>
        <recipients>
            <field>Authorizee__c</field>
            <type>userLookup</type>
        </recipients>
        <recipients>
            <field>Authorizer__c</field>
            <type>userLookup</type>
        </recipients>
        <recipients>
            <field>emailForwardPerson__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>DefaultWorkflowUser</senderType>
        <template>SubAuthorized/SubAuthorizeeApprovalDone</template>
    </alerts>
    <alerts>
        <fullName>SubAuthorizedEndEmailAlert</fullName>
        <description>转授权申请结束邮件提醒</description>
        <protected>false</protected>
        <recipients>
            <type>owner</type>
        </recipients>
        <recipients>
            <recipient>chunxia_gao@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>ling_zhu@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <senderAddress>ocm_te2ampj@olympus.com.cn</senderAddress>
        <senderType>OrgWideEmailAddress</senderType>
        <template>SubAuthorized/SubAuthorizedEndTemplate</template>
    </alerts>
    <alerts>
        <fullName>SubAuthorizedNotApprovalEmailAlert</fullName>
        <description>转授权申请驳回邮件提醒</description>
        <protected>false</protected>
        <recipients>
            <type>owner</type>
        </recipients>
        <recipients>
            <recipient>chunxia_gao@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <recipients>
            <recipient>ling_zhu@olympus.com.cn</recipient>
            <type>user</type>
        </recipients>
        <senderType>DefaultWorkflowUser</senderType>
        <template>SubAuthorized/SubAuthorizedNotApproval</template>
    </alerts>
    <fieldUpdates>
        <fullName>ActionSubAuthorizedStatusApprovalUpdate</fullName>
        <field>Status__c</field>
        <literalValue>已批准</literalValue>
        <name>设定-状态修改到批准</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>ActionSubAuthorizedStatusUpdate</fullName>
        <field>Status__c</field>
        <literalValue>申请中</literalValue>
        <name>设定-状态修改到申请中</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>ActionSubAuthorizedStatusnApprovalUpdate</fullName>
        <field>Status__c</field>
        <literalValue>草案中</literalValue>
        <name>设定-状态修改到草案中</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>setUpSubAuthorizedName</fullName>
        <field>Name</field>
        <formula>Authorizer__r.Alias + &apos;于&apos; + Text(AuthorizedStartDate__c) + &apos;开始&apos;+ Text(AuthorizedEndDate__c) +&apos;结束的转授权申请&apos;</formula>
        <name>setUpSubAuthorizedName</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <rules>
        <fullName>转授权功能名自动生成</fullName>
        <actions>
            <name>setUpSubAuthorizedName</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>true</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>转授权结束邮件提醒</fullName>
        <actions>
            <name>SubAuthorizedEndEmailAlert</name>
            <type>Alert</type>
        </actions>
        <active>true</active>
        <formula>ISCHANGED(IsAuthorize__c) &amp;&amp; IsAuthorize__c = false &amp;&amp; PRIORVALUE(IsAuthorize__c ) = true</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
</Workflow>