高章伟
2022-03-10 8db20630a2675ca14e03ccdee91c614397b5c964
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>insPageBtn</fullName>
    <availability>online</availability>
    <description>window.open(&quot;/apex/OFSInsReportLayout?id={!URLENCODE(Inspection_Report__c.Id)}&quot;, &quot;&quot;, &quot;&quot;);</description>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>报告书明细编辑</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)}
{!RequireScript(&quot;/soap/ajax/51.0/apex.js&quot;)}
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)}
//2021-10-22 gwy 版本更改为51.0
var foo = function() {
var RecordTypeId = &quot;{!Inspection_Report__c.RecordTypeId}&quot;;
var url;
 
if(RecordTypeId == &apos;0121m000000m3Bi&apos;){
url = &apos;/apex/OFSInsReportLayoutForVm&apos;;
}else{
url = &apos;/apex/OFSInsReportLayout&apos;;
}
 
window.open(url += &apos;?id={!Inspection_Report__c.Id}&apos;)
}
foo();</url>
</WebLink>