用于在visualforce中打开窗口的自定义按钮,链接到电子邮件对象

时间:2013-09-12 06:41:59

标签: salesforce visualforce

         <tr data-field="@objecttype" data-caption="Type" />
              <tr data-field="@sfcontactname" data-caption="Candidate" />
              <tr data-field="@sfdepartment" data-caption="Department" />
              <tr><th>Email</th><td><%= email(raw.sfemail) %></td></tr>
              <tr data-field="@sfaccountname" data-caption="Candidate Company" />
              <tr data-field="@sfcontactfixedjobtitlec" data-caption="Fixed Job Title" />
              <tr data-field="@sfcontacttitle" data-caption="Legacy Job Title" />
              <tr data-field="@sfcontactfixedcategorytitlec" data-caption="Fixed Category Title" />
              <tr data-field="@sfcontactstatusc" data-caption="Status" />
              <tr data-field="@sfcontacthighestlevelofeducationc" data-caption="Highest Level of Education" />
              <tr data-field="@sfcontactlastnoteenteredactivityc" data-caption="Last Note Entered Activity" />
              <tr data-field="@sfcontactlastemailactivityc" data-caption="Last Email Activity" />
              <tr data-field="@sfleadsource" data-caption="Source of Candidate" />    
              <tr data-field="@sfcontactcommuteradiusc" data-caption="(IV) Commute Radius Miles" />
              <tr data-field="@sfcontactdesiredcompanysizec" data-caption="(IV) Desired Company Size" />
              <tr data-field="@sfcontactworkauthorizationc" data-caption="(IV)Work Authorization" />
              <tr data-field="@sfcontactassigntoexpertisec" data-caption="(IV) Assign to Expertise" />
              <tr data-field="@sfcontactpreferredenvironmentc" data-caption="(IV) Preferred Environment" />
              <tr data-field="@sfhomephone" data-caption="Home Phone" />
              <tr data-field="@sfmobilephone" data-caption="Mobile Phone" />
              <tr data-field="@sfcity" data-caption="City" />
              <tr data-field="@sfstate" data-caption="State" />

我想添加一个按钮或URL来链接到Salesforce中的特定网址(连接到电子邮件对象),并将Salesforce“@sfcontactname”传递到网址:

https://na15.salesforce.com/_ui/core/email/author/EmailAuthor?p2_lkid=003i000000JrLK3&rtype=003&retURL=%2F003i000000JrLK3AAN

1 个答案:

答案 0 :(得分:0)

要将数据字段属性值作为tr onclick事件的参数传递,您可以使用this.attributes ['data-field']。value

<tr data-field="@sfstate" data-caption="State" onclick="document.location.href = 'https://na15.salesforce.com/...' + this.attributes['data-field'].value"><td></td></tr>