在SFDC中的参数列表之后丢失)

时间:2016-02-29 04:11:02

标签: javascript ajax button salesforce

我收到以下错误

  参数列表“

之后

”缺失“

单击SFDC中的自定义按钮时。该按钮的目的是在我们的内部和社区环境中启动特定的案例类型。

感谢任何帮助!

{!REQUIRESCRIPT("/soap/ajax/28.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/28.0/apex.js")} 

if('{!$Site.Prefix}'!=''){ window.open('{!$Site.Prefix}/500/e?retURL=%2F500%2Fo&RecordType=0121b0000004IKZ,'_parent'); 
}else{window.open('500/e?retURL=%2F500%2Fo&RecordType=0121b0000004IKZ,'_parent');} 

var qr = sforce.connection.query("select Id from recordType where (name= 'Device Request') and sObjecttype = 'Case'");

1 个答案:

答案 0 :(得分:0)

试试这个:

{
    !REQUIRESCRIPT("/soap/ajax/28.0/connection.js")
} {
    !REQUIRESCRIPT("/soap/ajax/28.0/apex.js")
}

if ('{!$Site.Prefix}' != '') {
    window.open('{!$Site.Prefix}/500/e?retURL=%2F500%2Fo&RecordType=0121b0000004IKZ','_parent'); 
}else{
    window.open('500 / e ? retURL = % 2 F500 % 2 Fo & RecordType = 0121 b0000004IKZ', '_parent');
}

var qr = sforce.connection.query("select Id from recordType where (name= 'Device Request') and sObjecttype = 'Case'");