<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>Predicted_Date_Change</fullName>
|
<availability>online</availability>
|
<displayType>button</displayType>
|
<linkType>javascript</linkType>
|
<masterLabel>修改预测日</masterLabel>
|
<openType>onClickJavaScript</openType>
|
<protected>false</protected>
|
<url>{!REQUIRESCRIPT("/soap/ajax/51.0/connection.js")};
|
{!REQUIRESCRIPT("/soap/ajax/51.0/apex.js")};
|
{!RequireScript("/resource/CommonUtilJs")};
|
|
function foo(){
|
// 20221206 ljh DB202212030068 start
|
//var DirectLossFLG = '{!Opportunity.DirectLossFLG__c}';
|
//var CreatedDay = '{!Opportunity.Created_Day__c}';
|
//var Day = '{!DATE(2022,12,03)}';
|
//if((DirectLossFLG == 'true' || DirectLossFLG == 1 ) && CreatedDay > Day){
|
// alert('从招标项目点击失单新建的询价,预测OCSM签约日(KPI)和预测发货日不允许修改');
|
// return;
|
//}
|
// 20221206 ljh DB202212030068 end
|
var sql = "select id from InquiryPredictsDateChange__c where Predicted_Date_Status__c = '审批中' and Opportunity__c ='" + '{!Opportunity.Id}'+ "'";
|
var sqlResult = sforce.connection.query(sql);
|
|
if (sqlResult.size > 0) {
|
alert('已存在待审批的变更申请!');
|
return;
|
} else {
|
window.open('/apex/ImprovedForecastTime?id={!Opportunity.Id}','','height=500,width=800,top=200,left=250,location=no');
|
|
}
|
}
|
|
|
foo();</url>
|
</WebLink>
|