admin管理员组文章数量:1424668
Here's what I'm using as a custom button control in Salesforce that executes JavaScript.
location.replace('/email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p7=GetURLHere&p2_lkid={!Case.ContactId}&template_id=00Xc0000000HrOk');
The GetURLHere
part is where I'd like to grab the current URL and place it on the next page.
This form works like Select Listview > Click Button > New page loads with the previous pages URL in the p7 field.
p7
represents a field I'd like to put it into upon page load.
The usual document.location.href
doesn't want to work in this control.
Any idea on how to do this in the Force environment?
Here's what I'm using as a custom button control in Salesforce that executes JavaScript.
location.replace('/email/author/emailauthor.jsp?retURL=/{!Case.Id}&p3_lkid={!Case.Id}&rtype=003&p7=GetURLHere&p2_lkid={!Case.ContactId}&template_id=00Xc0000000HrOk');
The GetURLHere
part is where I'd like to grab the current URL and place it on the next page.
This form works like Select Listview > Click Button > New page loads with the previous pages URL in the p7 field.
p7
represents a field I'd like to put it into upon page load.
The usual document.location.href
doesn't want to work in this control.
Any idea on how to do this in the Force. environment?
Share Improve this question edited May 14, 2012 at 19:17 Command-Z asked May 13, 2012 at 1:25 Command-ZCommand-Z 131 silver badge5 bronze badges1 Answer
Reset to default 4You should be able to use the $CurrentPage object to get the current pages url as a formula expression.
document.location.href = '{!$CurrentPage.URL}';
本文标签:
版权声明:本文标题:salesforce - How do I grab the current page URL and place it into a new URL reference in JavaScript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744634836a2616762.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论