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
| <?xml version="1.0" encoding="UTF-8"?>
| <WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
| <fullName>BeforeOPDPDFBtn_SIS</fullName>
| <availability>online</availability>
| <displayType>button</displayType>
| <linkType>javascript</linkType>
| <masterLabel>产品试用评价SIS</masterLabel>
| <openType>onClickJavaScript</openType>
| <protected>false</protected>
| <url>if (window.confirm('是否新建SIS报告书?')) {
| try {
| sforce.connection.sessionId = "{!GETSESSIONID()}";
| var accid = '{!Opportunity.AccountId}';
| var recordType = 'SIS';
| var repOwnerId = '{!$User.Id}';
|
| var pdfno = sforce.apex.execute("ControllerUtil", "selectCommonSequence", {valueField: 'EvaluationPDF_NextValue__c', formatField: 'EvaluationPDF_Format__c'});
|
| //新建SIS报告书
| var rtn = sforce.apex.execute("Add_Report", "addReportOPWithEvaluationPDF",
| {repOwnerId: repOwnerId,
| reportId: null,
| dailyReportId: null,
| eventId: null,
| recordType: recordType,
| aId: accid,
| visitor1: null,
| visitor2: null,
| visitor3: null,
| visitor4: null,
| visitor5: null,
| opp1: '{!Opportunity.Id}',
| opp2: null,
| opp3: null,
| opp4: null,
| opp5: null,
| reportDate: null,
| evaluationPDFNumber: pdfno,
| pro1: null
| }
| );
| window.open('/apex/BeforeOPDPDF?oid=' + '{!Opportunity.Id}' + '&pdfNo=' + pdfno, 'BeforeOPDPDF');
| } catch(e) {
| alert(e);
| }
| } else {
| window.open('/apex/BeforeOPDPDF?oid=' + '{!Opportunity.Id}', 'BeforeOPDPDF');
| }</url>
| </WebLink>
|
|