码迷,mamicode.com
首页 > Web开发 > 详细

046_Get URL

时间:2017-12-04 19:02:10      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:http   ext   turn   dcom   ret   url   write   for   ges   

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 >

046_Get URL

标签:http   ext   turn   dcom   ret   url   write   for   ges   

原文地址:http://www.cnblogs.com/bandariFang/p/7978100.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!