【发布时间】:2016-03-11 23:27:20
【问题描述】:
我在 Salesforce 中有一个名为 Website_Role__c 的自定义对象。此对象包含与具有不同角色(所有者、导师等)的商店相关联的人员列表。
在帐户上的 Salesforce 按钮中使用 JavaScript:
所需的行为是用户单击按钮并弹出一个对话框,其中包含该帐户的 Website_Role__c 中的人员列表。每个人旁边都会有一个复选框,允许用户选择他们。
我们正在使用 eSign(以前称为 EchoSign)。此按钮是“使用电子签名发送”按钮,用于将协议发送到来自 Website_Role__c 的人员列表。
这就是我现在的位置:
/*My Attempt*/
{
!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")
} //adds the proper code for inclusion of AJAX toolkit
var url = parent.location.href; //string for the URL of the current page
var records = {!GETRECORDIDS($ObjectType.Website_Role__c)
}; //grabs the Website Role records for the currently selected store
var updateRecords = []; //array for holding records that this code will ultimately update
if (records[0] == null) { //if the button was clicked but there was no record selected
alert("Please select at least one person to send to."); //alert the user that they didn't make a selection
} else { //otherwise, there was a person selected
for (var a = 0; a < records.length; a++) { //for all records
var update_Website_Role__c = new sforce.SObject("Website_Role__c"); //create a new sObject for storing updated record details
//This is where I get lost. Not sure if this is even the correct approach
}
//??
parent.location.href = url; //refresh the page
}
如果您能提供任何帮助,我将不胜感激。 谢谢
【问题讨论】:
标签: javascript salesforce