会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
BandariFang
博客园
首页
新随笔
联系
订阅
管理
046_salesforce 中 Get URL
Suppose u have the whole URL as: < https://cs14.salesforce.com/apex/myVFpage?id=906F00000008w9wIAA >
String baseURL = URL.getSalesforceBaseUrl().toExternalForm();
// it will return: < https://cs14.salesforce.com >
String PageURL = ApexPages.currentPage().getUrl();
// it will return: < /apex/myVFpage?id=906F00000008w9wIAA >
So to get your whole exact URL you can write:
String wholeURL = baseURL+PageURL;
// it will return: < https://cs14.salesforce.com/apex/myVFpage?id=906F00000008w9wIAA >
此刻,静下心来学习
posted @
2017-12-04 17:23
BandariFang
阅读(
521
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告
String baseURL = URL.getSalesforceBaseUrl().toExternalForm(); // it will return: < https://cs14.salesforce.com >
String PageURL = ApexPages.currentPage().getUrl(); // it will return: < /apex/myVFpage?id=906F00000008w9wIAA >
So to get your whole exact URL you can write:
String wholeURL = baseURL+PageURL; // it will return: < https://cs14.salesforce.com/apex/myVFpage?id=906F00000008w9wIAA >