<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>Request_DB</fullName>
|
<availability>online</availability>
|
<displayType>button</displayType>
|
<linkType>javascript</linkType>
|
<masterLabel>授权委托</masterLabel>
|
<openType>onClickJavaScript</openType>
|
<protected>false</protected>
|
<url>var profileId = '{!$User.ProfileId}';
|
if (profileId != '00e10000000Y3o5' && profileId != '00e10000000xnp2' &&
|
profileId != '00e10000000xnpH') {
|
alert("您没有授权委托的权限。请联系系统管理员。");
|
}
|
|
|
// jsの場合、翻訳された値がでるので、要注意
|
else if ('{!Opportunity.StageName}' != '引合'
|
&& '{!Opportunity.StageName}' != '询价'
|
) {
|
alert("状态1:" + '{!Opportunity.StageName}' + "、不能做授权申请!");
|
}
|
else if ('{!Opportunity.SAP_Send_OK__c}' == '1') {
|
alert("已经上传SAP、不能做授权申请了!");
|
}
|
else if ({!Opportunity.Cnt_Lost_cancel_report__c} - {!Opportunity.Cnt_Lost_cancel_Draft__c} > 0) {
|
alert("询价已经有取消/失单报告了!");
|
}
|
else {
|
location.href = '/a2C/e?retURL=%2F{!URLENCODE(Opportunity.Id)}' +
|
'&RecordType=01210000000RNXi' +
|
'&CF00N10000006QdJz={!URLENCODE(Opportunity.Agency1__c)}' +
|
'&CF00N10000006QdJz_lkid={!URLENCODE(Opportunity.Agency1Id__c)}' +
|
'&CF00N10000006QdKn={!URLENCODE(Opportunity.Name)}' +
|
'&CF00N10000006QdKn_lkid={!URLENCODE(Opportunity.Id)}' +
|
'&00N10000006QdK4={!URLENCODE(Opportunity.Name)}' +
|
'&00N10000006QdYB={!Opportunity.Bid_Planned_Date__c}' +
|
'&CF00N10000006QdZT={!URLENCODE(Opportunity.Sales_assistant_name__c)}' +
|
'&CF00N10000006QdZT_lkid={!URLENCODE(Opportunity.Sales_assistant_ID__c)}' +
|
|
|
|
|
|
|
|
|
|
|
'';
|
}</url>
|
</WebLink>
|