涂煌豪
2022-04-11 a002dc01b27e6281f163eb35661c4a9e9541ea52
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>newEdit</fullName>
    <availability>online</availability>
    <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-21 gwy 版本更改为51.0
var foo = function() {
var records = new Array();
var result = sforce.connection.query(&quot;select id,Status__c from SolutionProjectRequirements__c where id= &apos;{!Solution_Programme__c.SolutionProjectRequirementsId__c}&apos; &quot;);
records = result.getArray(&quot;records&quot;);
if(records[0].Status__c == &apos;07结案&apos;){
alert(&apos;solution项目需求已结案,不能编辑&apos;);
}else{
var url = &quot;{!Solution_Programme__c.Id}/e?retURL=%2F{!Solution_Programme__c.Id}&quot;;
window.top.location.href=url;
 
}
}
foo();</url>
</WebLink>